home *** CD-ROM | disk | FTP | other *** search
/ Chip: 2001 Haziran / CHIP Haziran2001.iso / prog / share / 17 / dings_e.exe / Compiler / Include / DX7 / d3d.h next >
Encoding:
C/C++ Source or Header  |  1999-09-08  |  85.8 KB  |  1,684 lines

  1. /*==========================================================================;
  2.  *
  3.  *
  4.  *  File:   d3d.h
  5.  *  Content:    Direct3D include file
  6.  *
  7.  ****************************************************************************/
  8.  
  9. #ifndef _D3D_H_
  10. #define _D3D_H_
  11.  
  12.  
  13. #include <stdlib.h>
  14.  
  15. #define COM_NO_WINDOWS_H
  16. #include <objbase.h>
  17.  
  18. #define D3DAPI WINAPI
  19.  
  20. #ifndef DIRECT3D_VERSION
  21. #define DIRECT3D_VERSION         0x0700
  22. #endif
  23.  
  24. /*
  25.  * Interface IID's
  26.  */
  27. #if defined( _WIN32 ) && !defined( _NO_COM)
  28. DEFINE_GUID( IID_IDirect3D,             0x3BBA0080,0x2421,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56 );
  29. #if(DIRECT3D_VERSION >= 0x0500)
  30. DEFINE_GUID( IID_IDirect3D2,            0x6aae1ec1,0x662a,0x11d0,0x88,0x9d,0x00,0xaa,0x00,0xbb,0xb7,0x6a);
  31. #endif /* DIRECT3D_VERSION >= 0x0500 */
  32. #if(DIRECT3D_VERSION >= 0x0600)
  33. DEFINE_GUID( IID_IDirect3D3,            0xbb223240,0xe72b,0x11d0,0xa9,0xb4,0x00,0xaa,0x00,0xc0,0x99,0x3e);
  34. #endif /* DIRECT3D_VERSION >= 0x0600 */
  35. #if(DIRECT3D_VERSION >= 0x0700)
  36. DEFINE_GUID( IID_IDirect3D7,            0xf5049e77,0x4861,0x11d2,0xa4,0x7,0x0,0xa0,0xc9,0x6,0x29,0xa8);
  37. #endif /* DIRECT3D_VERSION >= 0x0700 */
  38.  
  39. #if(DIRECT3D_VERSION >= 0x0500)
  40. DEFINE_GUID( IID_IDirect3DRampDevice,   0xF2086B20,0x259F,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56 );
  41. DEFINE_GUID( IID_IDirect3DRGBDevice,    0xA4665C60,0x2673,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56 );
  42. DEFINE_GUID( IID_IDirect3DHALDevice,    0x84E63dE0,0x46AA,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
  43. DEFINE_GUID( IID_IDirect3DMMXDevice,    0x881949a1,0xd6f3,0x11d0,0x89,0xab,0x00,0xa0,0xc9,0x05,0x41,0x29 );
  44. #endif /* DIRECT3D_VERSION >= 0x0500 */
  45.  
  46. #if(DIRECT3D_VERSION >= 0x0600)
  47. DEFINE_GUID( IID_IDirect3DRefDevice,    0x50936643, 0x13e9, 0x11d1, 0x89, 0xaa, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29);
  48. DEFINE_GUID( IID_IDirect3DNullDevice, 0x8767df22, 0xbacc, 0x11d1, 0x89, 0x69, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0xa8);
  49. #endif /* DIRECT3D_VERSION >= 0x0600 */
  50. #if(DIRECT3D_VERSION >= 0x0700)
  51. DEFINE_GUID( IID_IDirect3DTnLHalDevice, 0xf5049e78, 0x4861, 0x11d2, 0xa4, 0x7, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0xa8);
  52. #endif /* DIRECT3D_VERSION >= 0x0700 */
  53.  
  54. /*
  55.  * Internal Guid to distinguish requested MMX from MMX being used as an RGB rasterizer
  56.  */
  57.  
  58. DEFINE_GUID( IID_IDirect3DDevice,       0x64108800,0x957d,0X11d0,0x89,0xab,0x00,0xa0,0xc9,0x05,0x41,0x29 );
  59. #if(DIRECT3D_VERSION >= 0x0500)
  60. DEFINE_GUID( IID_IDirect3DDevice2,  0x93281501, 0x8cf8, 0x11d0, 0x89, 0xab, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29);
  61. #endif /* DIRECT3D_VERSION >= 0x0500 */
  62. #if(DIRECT3D_VERSION >= 0x0600)
  63. DEFINE_GUID( IID_IDirect3DDevice3,  0xb0ab3b60, 0x33d7, 0x11d1, 0xa9, 0x81, 0x0, 0xc0, 0x4f, 0xd7, 0xb1, 0x74);
  64. #endif /* DIRECT3D_VERSION >= 0x0600 */
  65. #if(DIRECT3D_VERSION >= 0x0700)
  66. DEFINE_GUID( IID_IDirect3DDevice7,  0xf5049e79, 0x4861, 0x11d2, 0xa4, 0x7, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0xa8);
  67. #endif /* DIRECT3D_VERSION >= 0x0700 */
  68.  
  69. DEFINE_GUID( IID_IDirect3DTexture,      0x2CDCD9E0,0x25A0,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56 );
  70. #if(DIRECT3D_VERSION >= 0x0500)
  71. DEFINE_GUID( IID_IDirect3DTexture2, 0x93281502, 0x8cf8, 0x11d0, 0x89, 0xab, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29);
  72. #endif /* DIRECT3D_VERSION >= 0x0500 */
  73.  
  74. DEFINE_GUID( IID_IDirect3DLight,        0x4417C142,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
  75.  
  76. DEFINE_GUID( IID_IDirect3DMaterial,     0x4417C144,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
  77. #if(DIRECT3D_VERSION >= 0x0500)
  78. DEFINE_GUID( IID_IDirect3DMaterial2,    0x93281503, 0x8cf8, 0x11d0, 0x89, 0xab, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29);
  79. #endif /* DIRECT3D_VERSION >= 0x0500 */
  80. #if(DIRECT3D_VERSION >= 0x0600)
  81. DEFINE_GUID( IID_IDirect3DMaterial3,    0xca9c46f4, 0xd3c5, 0x11d1, 0xb7, 0x5a, 0x0, 0x60, 0x8, 0x52, 0xb3, 0x12);
  82. #endif /* DIRECT3D_VERSION >= 0x0600 */
  83.  
  84. DEFINE_GUID( IID_IDirect3DExecuteBuffer,0x4417C145,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
  85. DEFINE_GUID( IID_IDirect3DViewport,     0x4417C146,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
  86. #if(DIRECT3D_VERSION >= 0x0500)
  87. DEFINE_GUID( IID_IDirect3DViewport2,    0x93281500, 0x8cf8, 0x11d0, 0x89, 0xab, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29);
  88. #endif /* DIRECT3D_VERSION >= 0x0500 */
  89. #if(DIRECT3D_VERSION >= 0x0600)
  90. DEFINE_GUID( IID_IDirect3DViewport3,    0xb0ab3b61, 0x33d7, 0x11d1, 0xa9, 0x81, 0x0, 0xc0, 0x4f, 0xd7, 0xb1, 0x74);
  91. #endif /* DIRECT3D_VERSION >= 0x0600 */
  92. #if(DIRECT3D_VERSION >= 0x0600)
  93. DEFINE_GUID( IID_IDirect3DVertexBuffer, 0x7a503555, 0x4a83, 0x11d1, 0xa5, 0xdb, 0x0, 0xa0, 0xc9, 0x3, 0x67, 0xf8);
  94. #endif /* DIRECT3D_VERSION >= 0x0600 */
  95. #if(DIRECT3D_VERSION >= 0x0700)
  96. DEFINE_GUID( IID_IDirect3DVertexBuffer7, 0xf5049e7d, 0x4861, 0x11d2, 0xa4, 0x7, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0xa8);
  97. #endif /* DIRECT3D_VERSION >= 0x0700 */
  98. #endif
  99.  
  100. #ifdef __cplusplus
  101. struct IDirect3D;
  102. struct IDirect3DDevice;
  103. struct IDirect3DLight;
  104. struct IDirect3DMaterial;
  105. struct IDirect3DExecuteBuffer;
  106. struct IDirect3DTexture;
  107. struct IDirect3DViewport;
  108. typedef struct IDirect3D            *LPDIRECT3D;
  109. typedef struct IDirect3DDevice      *LPDIRECT3DDEVICE;
  110. typedef struct IDirect3DExecuteBuffer   *LPDIRECT3DEXECUTEBUFFER;
  111. typedef struct IDirect3DLight       *LPDIRECT3DLIGHT;
  112. typedef struct IDirect3DMaterial    *LPDIRECT3DMATERIAL;
  113. typedef struct IDirect3DTexture     *LPDIRECT3DTEXTURE;
  114. typedef struct IDirect3DViewport    *LPDIRECT3DVIEWPORT;
  115.  
  116. #if(DIRECT3D_VERSION >= 0x0500)
  117. struct IDirect3D2;
  118. struct IDirect3DDevice2;
  119. struct IDirect3DMaterial2;
  120. struct IDirect3DTexture2;
  121. struct IDirect3DViewport2;
  122. typedef struct IDirect3D2           *LPDIRECT3D2;
  123. typedef struct IDirect3DDevice2     *LPDIRECT3DDEVICE2;
  124. typedef struct IDirect3DMaterial2   *LPDIRECT3DMATERIAL2;
  125. typedef struct IDirect3DTexture2    *LPDIRECT3DTEXTURE2;
  126. typedef struct IDirect3DViewport2   *LPDIRECT3DVIEWPORT2;
  127. #endif /* DIRECT3D_VERSION >= 0x0500 */
  128.  
  129. #if(DIRECT3D_VERSION >= 0x0600)
  130. struct IDirect3D3;
  131. struct IDirect3DDevice3;
  132. struct IDirect3DMaterial3;
  133. struct IDirect3DViewport3;
  134. struct IDirect3DVertexBuffer;
  135. typedef struct IDirect3D3            *LPDIRECT3D3;
  136. typedef struct IDirect3DDevice3      *LPDIRECT3DDEVICE3;
  137. typedef struct IDirect3DMaterial3    *LPDIRECT3DMATERIAL3;
  138. typedef struct IDirect3DViewport3    *LPDIRECT3DVIEWPORT3;
  139. typedef struct IDirect3DVertexBuffer *LPDIRECT3DVERTEXBUFFER;
  140. #endif /* DIRECT3D_VERSION >= 0x0600 */
  141.  
  142. #if(DIRECT3D_VERSION >= 0x0700)
  143. struct IDirect3D7;
  144. struct IDirect3DDevice7;
  145. struct IDirect3DVertexBuffer7;
  146. typedef struct IDirect3D7             *LPDIRECT3D7;
  147. typedef struct IDirect3DDevice7       *LPDIRECT3DDEVICE7;
  148. typedef struct IDirect3DVertexBuffer7 *LPDIRECT3DVERTEXBUFFER7;
  149. #endif /* DIRECT3D_VERSION >= 0x0700 */
  150.  
  151. #else
  152.  
  153. typedef struct IDirect3D        *LPDIRECT3D;
  154. typedef struct IDirect3DDevice      *LPDIRECT3DDEVICE;
  155. typedef struct IDirect3DExecuteBuffer   *LPDIRECT3DEXECUTEBUFFER;
  156. typedef struct IDirect3DLight       *LPDIRECT3DLIGHT;
  157. typedef struct IDirect3DMaterial    *LPDIRECT3DMATERIAL;
  158. typedef struct IDirect3DTexture     *LPDIRECT3DTEXTURE;
  159. typedef struct IDirect3DViewport    *LPDIRECT3DVIEWPORT;
  160.  
  161. #if(DIRECT3D_VERSION >= 0x0500)
  162. typedef struct IDirect3D2           *LPDIRECT3D2;
  163. typedef struct IDirect3DDevice2     *LPDIRECT3DDEVICE2;
  164. typedef struct IDirect3DMaterial2   *LPDIRECT3DMATERIAL2;
  165. typedef struct IDirect3DTexture2    *LPDIRECT3DTEXTURE2;
  166. typedef struct IDirect3DViewport2   *LPDIRECT3DVIEWPORT2;
  167. #endif /* DIRECT3D_VERSION >= 0x0500 */
  168.  
  169. #if(DIRECT3D_VERSION >= 0x0600)
  170. typedef struct IDirect3D3            *LPDIRECT3D3;
  171. typedef struct IDirect3DDevice3      *LPDIRECT3DDEVICE3;
  172. typedef struct IDirect3DMaterial3    *LPDIRECT3DMATERIAL3;
  173. typedef struct IDirect3DViewport3    *LPDIRECT3DVIEWPORT3;
  174. typedef struct IDirect3DVertexBuffer *LPDIRECT3DVERTEXBUFFER;
  175. #endif /* DIRECT3D_VERSION >= 0x0600 */
  176.  
  177. #if(DIRECT3D_VERSION >= 0x0700)
  178. typedef struct IDirect3D7             *LPDIRECT3D7;
  179. typedef struct IDirect3DDevice7       *LPDIRECT3DDEVICE7;
  180. typedef struct IDirect3DVertexBuffer7 *LPDIRECT3DVERTEXBUFFER7;
  181. #endif /* DIRECT3D_VERSION >= 0x0700 */
  182.  
  183. #endif
  184.  
  185. #include "d3dtypes.h"
  186. #include "d3dcaps.h"
  187.  
  188.  
  189. #ifdef __cplusplus
  190. extern "C" {
  191. #endif
  192.  
  193. /*
  194.  * Direct3D interfaces
  195.  */
  196. #undef INTERFACE
  197. #define INTERFACE IDirect3D
  198.  
  199. DECLARE_INTERFACE_(IDirect3D, IUnknown)
  200. {
  201.     /*** IUnknown methods ***/
  202.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  203.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  204.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  205.  
  206.     /*** IDirect3D methods ***/
  207.     STDMETHOD(Initialize)(THIS_ REFCLSID) PURE;
  208.     STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK,LPVOID) PURE;
  209.     STDMETHOD(CreateLight)(THIS_ LPDIRECT3DLIGHT*,IUnknown*) PURE;
  210.     STDMETHOD(CreateMaterial)(THIS_ LPDIRECT3DMATERIAL*,IUnknown*) PURE;
  211.     STDMETHOD(CreateViewport)(THIS_ LPDIRECT3DVIEWPORT*,IUnknown*) PURE;
  212.     STDMETHOD(FindDevice)(THIS_ LPD3DFINDDEVICESEARCH,LPD3DFINDDEVICERESULT) PURE;
  213. };
  214.  
  215. typedef struct IDirect3D *LPDIRECT3D;
  216.  
  217. #if !defined(__cplusplus) || defined(CINTERFACE)
  218. #define IDirect3D_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  219. #define IDirect3D_AddRef(p) (p)->lpVtbl->AddRef(p)
  220. #define IDirect3D_Release(p) (p)->lpVtbl->Release(p)
  221. #define IDirect3D_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
  222. #define IDirect3D_EnumDevices(p,a,b) (p)->lpVtbl->EnumDevices(p,a,b)
  223. #define IDirect3D_CreateLight(p,a,b) (p)->lpVtbl->CreateLight(p,a,b)
  224. #define IDirect3D_CreateMaterial(p,a,b) (p)->lpVtbl->CreateMaterial(p,a,b)
  225. #define IDirect3D_CreateViewport(p,a,b) (p)->lpVtbl->CreateViewport(p,a,b)
  226. #define IDirect3D_FindDevice(p,a,b) (p)->lpVtbl->FindDevice(p,a,b)
  227. #else
  228. #define IDirect3D_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  229. #define IDirect3D_AddRef(p) (p)->AddRef()
  230. #define IDirect3D_Release(p) (p)->Release()
  231. #define IDirect3D_Initialize(p,a) (p)->Initialize(a)
  232. #define IDirect3D_EnumDevices(p,a,b) (p)->EnumDevices(a,b)
  233. #define IDirect3D_CreateLight(p,a,b) (p)->CreateLight(a,b)
  234. #define IDirect3D_CreateMaterial(p,a,b) (p)->CreateMaterial(a,b)
  235. #define IDirect3D_CreateViewport(p,a,b) (p)->CreateViewport(a,b)
  236. #define IDirect3D_FindDevice(p,a,b) (p)->FindDevice(a,b)
  237. #endif
  238.  
  239. #if(DIRECT3D_VERSION >= 0x0500)
  240. #undef INTERFACE
  241. #define INTERFACE IDirect3D2
  242.  
  243. DECLARE_INTERFACE_(IDirect3D2, IUnknown)
  244. {
  245.     /*** IUnknown methods ***/
  246.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  247.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  248.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  249.  
  250.     /*** IDirect3D2 methods ***/
  251.     STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK,LPVOID) PURE;
  252.     STDMETHOD(CreateLight)(THIS_ LPDIRECT3DLIGHT*,IUnknown*) PURE;
  253.     STDMETHOD(CreateMaterial)(THIS_ LPDIRECT3DMATERIAL2*,IUnknown*) PURE;
  254.     STDMETHOD(CreateViewport)(THIS_ LPDIRECT3DVIEWPORT2*,IUnknown*) PURE;
  255.     STDMETHOD(FindDevice)(THIS_ LPD3DFINDDEVICESEARCH,LPD3DFINDDEVICERESULT) PURE;
  256.     STDMETHOD(CreateDevice)(THIS_ REFCLSID,LPDIRECTDRAWSURFACE,LPDIRECT3DDEVICE2*) PURE;
  257. };
  258.  
  259. typedef struct IDirect3D2 *LPDIRECT3D2;
  260.  
  261. #if !defined(__cplusplus) || defined(CINTERFACE)
  262. #define IDirect3D2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  263. #define IDirect3D2_AddRef(p) (p)->lpVtbl->AddRef(p)
  264. #define IDirect3D2_Release(p) (p)->lpVtbl->Release(p)
  265. #define IDirect3D2_EnumDevices(p,a,b) (p)->lpVtbl->EnumDevices(p,a,b)
  266. #define IDirect3D2_CreateLight(p,a,b) (p)->lpVtbl->CreateLight(p,a,b)
  267. #define IDirect3D2_CreateMaterial(p,a,b) (p)->lpVtbl->CreateMaterial(p,a,b)
  268. #define IDirect3D2_CreateViewport(p,a,b) (p)->lpVtbl->CreateViewport(p,a,b)
  269. #define IDirect3D2_FindDevice(p,a,b) (p)->lpVtbl->FindDevice(p,a,b)
  270. #define IDirect3D2_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
  271. #else
  272. #define IDirect3D2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  273. #define IDirect3D2_AddRef(p) (p)->AddRef()
  274. #define IDirect3D2_Release(p) (p)->Release()
  275. #define IDirect3D2_EnumDevices(p,a,b) (p)->EnumDevices(a,b)
  276. #define IDirect3D2_CreateLight(p,a,b) (p)->CreateLight(a,b)
  277. #define IDirect3D2_CreateMaterial(p,a,b) (p)->CreateMaterial(a,b)
  278. #define IDirect3D2_CreateViewport(p,a,b) (p)->CreateViewport(a,b)
  279. #define IDirect3D2_FindDevice(p,a,b) (p)->FindDevice(a,b)
  280. #define IDirect3D2_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
  281. #endif
  282. #endif /* DIRECT3D_VERSION >= 0x0500 */
  283.  
  284. #if(DIRECT3D_VERSION >= 0x0600)
  285. #undef INTERFACE
  286. #define INTERFACE IDirect3D3
  287.  
  288. DECLARE_INTERFACE_(IDirect3D3, IUnknown)
  289. {
  290.     /*** IUnknown methods ***/
  291.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  292.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  293.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  294.  
  295.     /*** IDirect3D3 methods ***/
  296.     STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK,LPVOID) PURE;
  297.     STDMETHOD(CreateLight)(THIS_ LPDIRECT3DLIGHT*,LPUNKNOWN) PURE;
  298.     STDMETHOD(CreateMaterial)(THIS_ LPDIRECT3DMATERIAL3*,LPUNKNOWN) PURE;
  299.     STDMETHOD(CreateViewport)(THIS_ LPDIRECT3DVIEWPORT3*,LPUNKNOWN) PURE;
  300.     STDMETHOD(FindDevice)(THIS_ LPD3DFINDDEVICESEARCH,LPD3DFINDDEVICERESULT) PURE;
  301.     STDMETHOD(CreateDevice)(THIS_ REFCLSID,LPDIRECTDRAWSURFACE4,LPDIRECT3DDEVICE3*,LPUNKNOWN) PURE;
  302.     STDMETHOD(CreateVertexBuffer)(THIS_ LPD3DVERTEXBUFFERDESC,LPDIRECT3DVERTEXBUFFER*,DWORD,LPUNKNOWN) PURE;
  303.     STDMETHOD(EnumZBufferFormats)(THIS_ REFCLSID,LPD3DENUMPIXELFORMATSCALLBACK,LPVOID) PURE;
  304.     STDMETHOD(EvictManagedTextures)(THIS) PURE;
  305. };
  306.  
  307. typedef struct IDirect3D3 *LPDIRECT3D3;
  308.  
  309. #if !defined(__cplusplus) || defined(CINTERFACE)
  310. #define IDirect3D3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  311. #define IDirect3D3_AddRef(p) (p)->lpVtbl->AddRef(p)
  312. #define IDirect3D3_Release(p) (p)->lpVtbl->Release(p)
  313. #define IDirect3D3_EnumDevices(p,a,b) (p)->lpVtbl->EnumDevices(p,a,b)
  314. #define IDirect3D3_CreateLight(p,a,b) (p)->lpVtbl->CreateLight(p,a,b)
  315. #define IDirect3D3_CreateMaterial(p,a,b) (p)->lpVtbl->CreateMaterial(p,a,b)
  316. #define IDirect3D3_CreateViewport(p,a,b) (p)->lpVtbl->CreateViewport(p,a,b)
  317. #define IDirect3D3_FindDevice(p,a,b) (p)->lpVtbl->FindDevice(p,a,b)
  318. #define IDirect3D3_CreateDevice(p,a,b,c,d) (p)->lpVtbl->CreateDevice(p,a,b,c,d)
  319. #define IDirect3D3_CreateVertexBuffer(p,a,b,c,d) (p)->lpVtbl->CreateVertexBuffer(p,a,b,c,d)
  320. #define IDirect3D3_EnumZBufferFormats(p,a,b,c) (p)->lpVtbl->EnumZBufferFormats(p,a,b,c)
  321. #define IDirect3D3_EvictManagedTextures(p) (p)->lpVtbl->EvictManagedTextures(p)
  322. #else
  323. #define IDirect3D3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  324. #define IDirect3D3_AddRef(p) (p)->AddRef()
  325. #define IDirect3D3_Release(p) (p)->Release()
  326. #define IDirect3D3_EnumDevices(p,a,b) (p)->EnumDevices(a,b)
  327. #define IDirect3D3_CreateLight(p,a,b) (p)->CreateLight(a,b)
  328. #define IDirect3D3_CreateMaterial(p,a,b) (p)->CreateMaterial(a,b)
  329. #define IDirect3D3_CreateViewport(p,a,b) (p)->CreateViewport(a,b)
  330. #define IDirect3D3_FindDevice(p,a,b) (p)->FindDevice(a,b)
  331. #define IDirect3D3_CreateDevice(p,a,b,c,d) (p)->CreateDevice(a,b,c,d)
  332. #define IDirect3D3_CreateVertexBuffer(p,a,b,c,d) (p)->CreateVertexBuffer(a,b,c,d)
  333. #define IDirect3D3_EnumZBufferFormats(p,a,b,c) (p)->EnumZBufferFormats(a,b,c)
  334. #define IDirect3D3_EvictManagedTextures(p) (p)->EvictManagedTextures()
  335. #endif
  336. #endif /* DIRECT3D_VERSION >= 0x0600 */
  337.  
  338. #if(DIRECT3D_VERSION >= 0x0700)
  339. #undef INTERFACE
  340. #define INTERFACE IDirect3D7
  341.  
  342. DECLARE_INTERFACE_(IDirect3D7, IUnknown)
  343. {
  344.     /*** IUnknown methods ***/
  345.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  346.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  347.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  348.  
  349.     /*** IDirect3D7 methods ***/
  350.     STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK7,LPVOID) PURE;
  351.     STDMETHOD(CreateDevice)(THIS_ REFCLSID,LPDIRECTDRAWSURFACE7,LPDIRECT3DDEVICE7*) PURE;
  352.     STDMETHOD(CreateVertexBuffer)(THIS_ LPD3DVERTEXBUFFERDESC,LPDIRECT3DVERTEXBUFFER7*,DWORD) PURE;
  353.     STDMETHOD(EnumZBufferFormats)(THIS_ REFCLSID,LPD3DENUMPIXELFORMATSCALLBACK,LPVOID) PURE;
  354.     STDMETHOD(EvictManagedTextures)(THIS) PURE;
  355. };
  356.  
  357. typedef struct IDirect3D7 *LPDIRECT3D7;
  358.  
  359. #if !defined(__cplusplus) || defined(CINTERFACE)
  360. #define IDirect3D7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  361. #define IDirect3D7_AddRef(p) (p)->lpVtbl->AddRef(p)
  362. #define IDirect3D7_Release(p) (p)->lpVtbl->Release(p)
  363. #define IDirect3D7_EnumDevices(p,a,b) (p)->lpVtbl->EnumDevices(p,a,b)
  364. #define IDirect3D7_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
  365. #define IDirect3D7_CreateVertexBuffer(p,a,b,c) (p)->lpVtbl->CreateVertexBuffer(p,a,b,c)
  366. #define IDirect3D7_EnumZBufferFormats(p,a,b,c) (p)->lpVtbl->EnumZBufferFormats(p,a,b,c)
  367. #define IDirect3D7_EvictManagedTextures(p) (p)->lpVtbl->EvictManagedTextures(p)
  368. #else
  369. #define IDirect3D7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  370. #define IDirect3D7_AddRef(p) (p)->AddRef()
  371. #define IDirect3D7_Release(p) (p)->Release()
  372. #define IDirect3D7_EnumDevices(p,a,b) (p)->EnumDevices(a,b)
  373. #define IDirect3D7_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
  374. #define IDirect3D7_CreateVertexBuffer(p,a,b,c) (p)->CreateVertexBuffer(a,b,c)
  375. #define IDirect3D7_EnumZBufferFormats(p,a,b,c) (p)->EnumZBufferFormats(a,b,c)
  376. #define IDirect3D7_EvictManagedTextures(p) (p)->EvictManagedTextures()
  377. #endif
  378. #endif /* DIRECT3D_VERSION >= 0x0700 */
  379. /*
  380.  * Direct3D Device interfaces
  381.  */
  382. #undef INTERFACE
  383. #define INTERFACE IDirect3DDevice
  384.  
  385. DECLARE_INTERFACE_(IDirect3DDevice, IUnknown)
  386. {
  387.     /*** IUnknown methods ***/
  388.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  389.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  390.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  391.  
  392.     /*** IDirect3DDevice methods ***/
  393.     STDMETHOD(Initialize)(THIS_ LPDIRECT3D,LPGUID,LPD3DDEVICEDESC) PURE;
  394.     STDMETHOD(GetCaps)(THIS_ LPD3DDEVICEDESC,LPD3DDEVICEDESC) PURE;
  395.     STDMETHOD(SwapTextureHandles)(THIS_ LPDIRECT3DTEXTURE,LPDIRECT3DTEXTURE) PURE;
  396.     STDMETHOD(CreateExecuteBuffer)(THIS_ LPD3DEXECUTEBUFFERDESC,LPDIRECT3DEXECUTEBUFFER*,IUnknown*) PURE;
  397.     STDMETHOD(GetStats)(THIS_ LPD3DSTATS) PURE;
  398.     STDMETHOD(Execute)(THIS_ LPDIRECT3DEXECUTEBUFFER,LPDIRECT3DVIEWPORT,DWORD) PURE;
  399.     STDMETHOD(AddViewport)(THIS_ LPDIRECT3DVIEWPORT) PURE;
  400.     STDMETHOD(DeleteViewport)(THIS_ LPDIRECT3DVIEWPORT) PURE;
  401.     STDMETHOD(NextViewport)(THIS_ LPDIRECT3DVIEWPORT,LPDIRECT3DVIEWPORT*,DWORD) PURE;
  402.     STDMETHOD(Pick)(THIS_ LPDIRECT3DEXECUTEBUFFER,LPDIRECT3DVIEWPORT,DWORD,LPD3DRECT) PURE;
  403.     STDMETHOD(GetPickRecords)(THIS_ LPDWORD,LPD3DPICKRECORD) PURE;
  404.     STDMETHOD(EnumTextureFormats)(THIS_ LPD3DENUMTEXTUREFORMATSCALLBACK,LPVOID) PURE;
  405.     STDMETHOD(CreateMatrix)(THIS_ LPD3DMATRIXHANDLE) PURE;
  406.     STDMETHOD(SetMatrix)(THIS_ D3DMATRIXHANDLE,const LPD3DMATRIX) PURE;
  407.     STDMETHOD(GetMatrix)(THIS_ D3DMATRIXHANDLE,LPD3DMATRIX) PURE;
  408.     STDMETHOD(DeleteMatrix)(THIS_ D3DMATRIXHANDLE) PURE;
  409.     STDMETHOD(BeginScene)(THIS) PURE;
  410.     STDMETHOD(EndScene)(THIS) PURE;
  411.     STDMETHOD(GetDirect3D)(THIS_ LPDIRECT3D*) PURE;
  412. };
  413.  
  414. typedef struct IDirect3DDevice *LPDIRECT3DDEVICE;
  415.  
  416. #if !defined(__cplusplus) || defined(CINTERFACE)
  417. #define IDirect3DDevice_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  418. #define IDirect3DDevice_AddRef(p) (p)->lpVtbl->AddRef(p)
  419. #define IDirect3DDevice_Release(p) (p)->lpVtbl->Release(p)
  420. #define IDirect3DDevice_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
  421. #define IDirect3DDevice_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
  422. #define IDirect3DDevice_SwapTextureHandles(p,a,b) (p)->lpVtbl->SwapTextureHandles(p,a,b)
  423. #define IDirect3DDevice_CreateExecuteBuffer(p,a,b,c) (p)->lpVtbl->CreateExecuteBuffer(p,a,b,c)
  424. #define IDirect3DDevice_GetStats(p,a) (p)->lpVtbl->GetStats(p,a)
  425. #define IDirect3DDevice_Execute(p,a,b,c) (p)->lpVtbl->Execute(p,a,b,c)
  426. #define IDirect3DDevice_AddViewport(p,a) (p)->lpVtbl->AddViewport(p,a)
  427. #define IDirect3DDevice_DeleteViewport(p,a) (p)->lpVtbl->DeleteViewport(p,a)
  428. #define IDirect3DDevice_NextViewport(p,a,b,c) (p)->lpVtbl->NextViewport(p,a,b,c)
  429. #define IDirect3DDevice_Pick(p,a,b,c,d) (p)->lpVtbl->Pick(p,a,b,c,d)
  430. #define IDirect3DDevice_GetPickRecords(p,a,b) (p)->lpVtbl->GetPickRecords(p,a,b)
  431. #define IDirect3DDevice_EnumTextureFormats(p,a,b) (p)->lpVtbl->EnumTextureFormats(p,a,b)
  432. #define IDirect3DDevice_CreateMatrix(p,a) (p)->lpVtbl->CreateMatrix(p,a)
  433. #define IDirect3DDevice_SetMatrix(p,a,b) (p)->lpVtbl->SetMatrix(p,a,b)
  434. #define IDirect3DDevice_GetMatrix(p,a,b) (p)->lpVtbl->GetMatrix(p,a,b)
  435. #define IDirect3DDevice_DeleteMatrix(p,a) (p)->lpVtbl->DeleteMatrix(p,a)
  436. #define IDirect3DDevice_BeginScene(p) (p)->lpVtbl->BeginScene(p)
  437. #define IDirect3DDevice_EndScene(p) (p)->lpVtbl->EndScene(p)
  438. #define IDirect3DDevice_GetDirect3D(p,a) (p)->lpVtbl->GetDirect3D(p,a)
  439. #else
  440. #define IDirect3DDevice_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  441. #define IDirect3DDevice_AddRef(p) (p)->AddRef()
  442. #define IDirect3DDevice_Release(p) (p)->Release()
  443. #define IDirect3DDevice_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
  444. #define IDirect3DDevice_GetCaps(p,a,b) (p)->GetCaps(a,b)
  445. #define IDirect3DDevice_SwapTextureHandles(p,a,b) (p)->SwapTextureHandles(a,b)
  446. #define IDirect3DDevice_CreateExecuteBuffer(p,a,b,c) (p)->CreateExecuteBuffer(a,b,c)
  447. #define IDirect3DDevice_GetStats(p,a) (p)->GetStats(a)
  448. #define IDirect3DDevice_Execute(p,a,b,c) (p)->Execute(a,b,c)
  449. #define IDirect3DDevice_AddViewport(p,a) (p)->AddViewport(a)
  450. #define IDirect3DDevice_DeleteViewport(p,a) (p)->DeleteViewport(a)
  451. #define IDirect3DDevice_NextViewport(p,a,b,c) (p)->NextViewport(a,b,c)
  452. #define IDirect3DDevice_Pick(p,a,b,c,d) (p)->Pick(a,b,c,d)
  453. #define IDirect3DDevice_GetPickRecords(p,a,b) (p)->GetPickRecords(a,b)
  454. #define IDirect3DDevice_EnumTextureFormats(p,a,b) (p)->EnumTextureFormats(a,b)
  455. #define IDirect3DDevice_CreateMatrix(p,a) (p)->CreateMatrix(a)
  456. #define IDirect3DDevice_SetMatrix(p,a,b) (p)->SetMatrix(a,b)
  457. #define IDirect3DDevice_GetMatrix(p,a,b) (p)->GetMatrix(a,b)
  458. #define IDirect3DDevice_DeleteMatrix(p,a) (p)->DeleteMatrix(a)
  459. #define IDirect3DDevice_BeginScene(p) (p)->BeginScene()
  460. #define IDirect3DDevice_EndScene(p) (p)->EndScene()
  461. #define IDirect3DDevice_GetDirect3D(p,a) (p)->GetDirect3D(a)
  462. #endif
  463.  
  464. #if(DIRECT3D_VERSION >= 0x0500)
  465. #undef INTERFACE
  466. #define INTERFACE IDirect3DDevice2
  467.  
  468. DECLARE_INTERFACE_(IDirect3DDevice2, IUnknown)
  469. {
  470.     /*** IUnknown methods ***/
  471.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  472.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  473.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  474.  
  475.     /*** IDirect3DDevice2 methods ***/
  476.     STDMETHOD(GetCaps)(THIS_ LPD3DDEVICEDESC,LPD3DDEVICEDESC) PURE;
  477.     STDMETHOD(SwapTextureHandles)(THIS_ LPDIRECT3DTEXTURE2,LPDIRECT3DTEXTURE2) PURE;
  478.     STDMETHOD(GetStats)(THIS_ LPD3DSTATS) PURE;
  479.     STDMETHOD(AddViewport)(THIS_ LPDIRECT3DVIEWPORT2) PURE;
  480.     STDMETHOD(DeleteViewport)(THIS_ LPDIRECT3DVIEWPORT2) PURE;
  481.     STDMETHOD(NextViewport)(THIS_ LPDIRECT3DVIEWPORT2,LPDIRECT3DVIEWPORT2*,DWORD) PURE;
  482.     STDMETHOD(EnumTextureFormats)(THIS_ LPD3DENUMTEXTUREFORMATSCALLBACK,LPVOID) PURE;
  483.     STDMETHOD(BeginScene)(THIS) PURE;
  484.     STDMETHOD(EndScene)(THIS) PURE;
  485.     STDMETHOD(GetDirect3D)(THIS_ LPDIRECT3D2*) PURE;
  486.     STDMETHOD(SetCurrentViewport)(THIS_ LPDIRECT3DVIEWPORT2) PURE;
  487.     STDMETHOD(GetCurrentViewport)(THIS_ LPDIRECT3DVIEWPORT2 *) PURE;
  488.     STDMETHOD(SetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE,DWORD) PURE;
  489.     STDMETHOD(GetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE *) PURE;
  490.     STDMETHOD(Begin)(THIS_ D3DPRIMITIVETYPE,D3DVERTEXTYPE,DWORD) PURE;
  491.     STDMETHOD(BeginIndexed)(THIS_ D3DPRIMITIVETYPE,D3DVERTEXTYPE,LPVOID,DWORD,DWORD) PURE;
  492.     STDMETHOD(Vertex)(THIS_ LPVOID) PURE;
  493.     STDMETHOD(Index)(THIS_ WORD) PURE;
  494.     STDMETHOD(End)(THIS_ DWORD) PURE;
  495.     STDMETHOD(GetRenderState)(THIS_ D3DRENDERSTATETYPE,LPDWORD) PURE;
  496.     STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE,DWORD) PURE;
  497.     STDMETHOD(GetLightState)(THIS_ D3DLIGHTSTATETYPE,LPDWORD) PURE;
  498.     STDMETHOD(SetLightState)(THIS_ D3DLIGHTSTATETYPE,DWORD) PURE;
  499.     STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE;
  500.     STDMETHOD(GetTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE;
  501.     STDMETHOD(MultiplyTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE;
  502.     STDMETHOD(DrawPrimitive)(THIS_ D3DPRIMITIVETYPE,D3DVERTEXTYPE,LPVOID,DWORD,DWORD) PURE;
  503.     STDMETHOD(DrawIndexedPrimitive)(THIS_ D3DPRIMITIVETYPE,D3DVERTEXTYPE,LPVOID,DWORD,LPWORD,DWORD,DWORD) PURE;
  504.     STDMETHOD(SetClipStatus)(THIS_ LPD3DCLIPSTATUS) PURE;
  505.     STDMETHOD(GetClipStatus)(THIS_ LPD3DCLIPSTATUS) PURE;
  506. };
  507.  
  508. typedef struct IDirect3DDevice2 *LPDIRECT3DDEVICE2;
  509.  
  510. #if !defined(__cplusplus) || defined(CINTERFACE)
  511. #define IDirect3DDevice2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  512. #define IDirect3DDevice2_AddRef(p) (p)->lpVtbl->AddRef(p)
  513. #define IDirect3DDevice2_Release(p) (p)->lpVtbl->Release(p)
  514. #define IDirect3DDevice2_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
  515. #define IDirect3DDevice2_SwapTextureHandles(p,a,b) (p)->lpVtbl->SwapTextureHandles(p,a,b)
  516. #define IDirect3DDevice2_GetStats(p,a) (p)->lpVtbl->GetStats(p,a)
  517. #define IDirect3DDevice2_AddViewport(p,a) (p)->lpVtbl->AddViewport(p,a)
  518. #define IDirect3DDevice2_DeleteViewport(p,a) (p)->lpVtbl->DeleteViewport(p,a)
  519. #define IDirect3DDevice2_NextViewport(p,a,b,c) (p)->lpVtbl->NextViewport(p,a,b,c)
  520. #define IDirect3DDevice2_EnumTextureFormats(p,a,b) (p)->lpVtbl->EnumTextureFormats(p,a,b)
  521. #define IDirect3DDevice2_BeginScene(p) (p)->lpVtbl->BeginScene(p)
  522. #define IDirect3DDevice2_EndScene(p) (p)->lpVtbl->EndScene(p)
  523. #define IDirect3DDevice2_GetDirect3D(p,a) (p)->lpVtbl->GetDirect3D(p,a)
  524. #define IDirect3DDevice2_SetCurrentViewport(p,a) (p)->lpVtbl->SetCurrentViewport(p,a)
  525. #define IDirect3DDevice2_GetCurrentViewport(p,a) (p)->lpVtbl->GetCurrentViewport(p,a)
  526. #define IDirect3DDevice2_SetRenderTarget(p,a,b) (p)->lpVtbl->SetRenderTarget(p,a,b)
  527. #define IDirect3DDevice2_GetRenderTarget(p,a) (p)->lpVtbl->GetRenderTarget(p,a)
  528. #define IDirect3DDevice2_Begin(p,a,b,c) (p)->lpVtbl->Begin(p,a,b,c)
  529. #define IDirect3DDevice2_BeginIndexed(p,a,b,c,d,e) (p)->lpVtbl->BeginIndexed(p,a,b,c,d,e)
  530. #define IDirect3DDevice2_Vertex(p,a) (p)->lpVtbl->Vertex(p,a)
  531. #define IDirect3DDevice2_Index(p,a) (p)->lpVtbl->Index(p,a)
  532. #define IDirect3DDevice2_End(p,a) (p)->lpVtbl->End(p,a)
  533. #define IDirect3DDevice2_GetRenderState(p,a,b) (p)->lpVtbl->GetRenderState(p,a,b)
  534. #define IDirect3DDevice2_SetRenderState(p,a,b) (p)->lpVtbl->SetRenderState(p,a,b)
  535. #define IDirect3DDevice2_GetLightState(p,a,b) (p)->lpVtbl->GetLightState(p,a,b)
  536. #define IDirect3DDevice2_SetLightState(p,a,b) (p)->lpVtbl->SetLightState(p,a,b)
  537. #define IDirect3DDevice2_SetTransform(p,a,b) (p)->lpVtbl->SetTransform(p,a,b)
  538. #define IDirect3DDevice2_GetTransform(p,a,b) (p)->lpVtbl->GetTransform(p,a,b)
  539. #define IDirect3DDevice2_MultiplyTransform(p,a,b) (p)->lpVtbl->MultiplyTransform(p,a,b)
  540. #define IDirect3DDevice2_DrawPrimitive(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitive(p,a,b,c,d,e)
  541. #define IDirect3DDevice2_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitive(p,a,b,c,d,e,f,g)
  542. #define IDirect3DDevice2_SetClipStatus(p,a) (p)->lpVtbl->SetClipStatus(p,a)
  543. #define IDirect3DDevice2_GetClipStatus(p,a) (p)->lpVtbl->GetClipStatus(p,a)
  544. #else
  545. #define IDirect3DDevice2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  546. #define IDirect3DDevice2_AddRef(p) (p)->AddRef()
  547. #define IDirect3DDevice2_Release(p) (p)->Release()
  548. #define IDirect3DDevice2_GetCaps(p,a,b) (p)->GetCaps(a,b)
  549. #define IDirect3DDevice2_SwapTextureHandles(p,a,b) (p)->SwapTextureHandles(a,b)
  550. #define IDirect3DDevice2_GetStats(p,a) (p)->GetStats(a)
  551. #define IDirect3DDevice2_AddViewport(p,a) (p)->AddViewport(a)
  552. #define IDirect3DDevice2_DeleteViewport(p,a) (p)->DeleteViewport(a)
  553. #define IDirect3DDevice2_NextViewport(p,a,b,c) (p)->NextViewport(a,b,c)
  554. #define IDirect3DDevice2_EnumTextureFormats(p,a,b) (p)->EnumTextureFormats(a,b)
  555. #define IDirect3DDevice2_BeginScene(p) (p)->BeginScene()
  556. #define IDirect3DDevice2_EndScene(p) (p)->EndScene()
  557. #define IDirect3DDevice2_GetDirect3D(p,a) (p)->GetDirect3D(a)
  558. #define IDirect3DDevice2_SetCurrentViewport(p,a) (p)->SetCurrentViewport(a)
  559. #define IDirect3DDevice2_GetCurrentViewport(p,a) (p)->GetCurrentViewport(a)
  560. #define IDirect3DDevice2_SetRenderTarget(p,a,b) (p)->SetRenderTarget(a,b)
  561. #define IDirect3DDevice2_GetRenderTarget(p,a) (p)->GetRenderTarget(a)
  562. #define IDirect3DDevice2_Begin(p,a,b,c) (p)->Begin(a,b,c)
  563. #define IDirect3DDevice2_BeginIndexed(p,a,b,c,d,e) (p)->BeginIndexed(a,b,c,d,e)
  564. #define IDirect3DDevice2_Vertex(p,a) (p)->Vertex(a)
  565. #define IDirect3DDevice2_Index(p,a) (p)->Index(a)
  566. #define IDirect3DDevice2_End(p,a) (p)->End(a)
  567. #define IDirect3DDevice2_GetRenderState(p,a,b) (p)->GetRenderState(a,b)
  568. #define IDirect3DDevice2_SetRenderState(p,a,b) (p)->SetRenderState(a,b)
  569. #define IDirect3DDevice2_GetLightState(p,a,b) (p)->GetLightState(a,b)
  570. #define IDirect3DDevice2_SetLightState(p,a,b) (p)->SetLightState(a,b)
  571. #define IDirect3DDevice2_SetTransform(p,a,b) (p)->SetTransform(a,b)
  572. #define IDirect3DDevice2_GetTransform(p,a,b) (p)->GetTransform(a,b)
  573. #define IDirect3DDevice2_MultiplyTransform(p,a,b) (p)->MultiplyTransform(a,b)
  574. #define IDirect3DDevice2_DrawPrimitive(p,a,b,c,d,e) (p)->DrawPrimitive(a,b,c,d,e)
  575. #define IDirect3DDevice2_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitive(a,b,c,d,e,f,g)
  576. #define IDirect3DDevice2_SetClipStatus(p,a) (p)->SetClipStatus(a)
  577. #define IDirect3DDevice2_GetClipStatus(p,a) (p)->GetClipStatus(a)
  578. #endif
  579. #endif /* DIRECT3D_VERSION >= 0x0500 */
  580.  
  581. #if(DIRECT3D_VERSION >= 0x0600)
  582. #undef INTERFACE
  583. #define INTERFACE IDirect3DDevice3
  584.  
  585. DECLARE_INTERFACE_(IDirect3DDevice3, IUnknown)
  586. {
  587.     /*** IUnknown methods ***/
  588.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  589.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  590.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  591.  
  592.     /*** IDirect3DDevice3 methods ***/
  593.     STDMETHOD(GetCaps)(THIS_ LPD3DDEVICEDESC,LPD3DDEVICEDESC) PURE;
  594.     STDMETHOD(GetStats)(THIS_ LPD3DSTATS) PURE;
  595.     STDMETHOD(AddViewport)(THIS_ LPDIRECT3DVIEWPORT3) PURE;
  596.     STDMETHOD(DeleteViewport)(THIS_ LPDIRECT3DVIEWPORT3) PURE;
  597.     STDMETHOD(NextViewport)(THIS_ LPDIRECT3DVIEWPORT3,LPDIRECT3DVIEWPORT3*,DWORD) PURE;
  598.     STDMETHOD(EnumTextureFormats)(THIS_ LPD3DENUMPIXELFORMATSCALLBACK,LPVOID) PURE;
  599.     STDMETHOD(BeginScene)(THIS) PURE;
  600.     STDMETHOD(EndScene)(THIS) PURE;
  601.     STDMETHOD(GetDirect3D)(THIS_ LPDIRECT3D3*) PURE;
  602.     STDMETHOD(SetCurrentViewport)(THIS_ LPDIRECT3DVIEWPORT3) PURE;
  603.     STDMETHOD(GetCurrentViewport)(THIS_ LPDIRECT3DVIEWPORT3 *) PURE;
  604.     STDMETHOD(SetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE4,DWORD) PURE;
  605.     STDMETHOD(GetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE4 *) PURE;
  606.     STDMETHOD(Begin)(THIS_ D3DPRIMITIVETYPE,DWORD,DWORD) PURE;
  607.     STDMETHOD(BeginIndexed)(THIS_ D3DPRIMITIVETYPE,DWORD,LPVOID,DWORD,DWORD) PURE;
  608.     STDMETHOD(Vertex)(THIS_ LPVOID) PURE;
  609.     STDMETHOD(Index)(THIS_ WORD) PURE;
  610.     STDMETHOD(End)(THIS_ DWORD) PURE;
  611.     STDMETHOD(GetRenderState)(THIS_ D3DRENDERSTATETYPE,LPDWORD) PURE;
  612.     STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE,DWORD) PURE;
  613.     STDMETHOD(GetLightState)(THIS_ D3DLIGHTSTATETYPE,LPDWORD) PURE;
  614.     STDMETHOD(SetLightState)(THIS_ D3DLIGHTSTATETYPE,DWORD) PURE;
  615.     STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE;
  616.     STDMETHOD(GetTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE;
  617.     STDMETHOD(MultiplyTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE;
  618.     STDMETHOD(DrawPrimitive)(THIS_ D3DPRIMITIVETYPE,DWORD,LPVOID,DWORD,DWORD) PURE;
  619.     STDMETHOD(DrawIndexedPrimitive)(THIS_ D3DPRIMITIVETYPE,DWORD,LPVOID,DWORD,LPWORD,DWORD,DWORD) PURE;
  620.     STDMETHOD(SetClipStatus)(THIS_ LPD3DCLIPSTATUS) PURE;
  621.     STDMETHOD(GetClipStatus)(THIS_ LPD3DCLIPSTATUS) PURE;
  622.     STDMETHOD(DrawPrimitiveStrided)(THIS_ D3DPRIMITIVETYPE,DWORD,LPD3DDRAWPRIMITIVESTRIDEDDATA,DWORD,DWORD) PURE;
  623.     STDMETHOD(DrawIndexedPrimitiveStrided)(THIS_ D3DPRIMITIVETYPE,DWORD,LPD3DDRAWPRIMITIVESTRIDEDDATA,DWORD,LPWORD,DWORD,DWORD) PURE;
  624.     STDMETHOD(DrawPrimitiveVB)(THIS_ D3DPRIMITIVETYPE,LPDIRECT3DVERTEXBUFFER,DWORD,DWORD,DWORD) PURE;
  625.     STDMETHOD(DrawIndexedPrimitiveVB)(THIS_ D3DPRIMITIVETYPE,LPDIRECT3DVERTEXBUFFER,LPWORD,DWORD,DWORD) PURE;
  626.     STDMETHOD(ComputeSphereVisibility)(THIS_ LPD3DVECTOR,LPD3DVALUE,DWORD,DWORD,LPDWORD) PURE;
  627.     STDMETHOD(GetTexture)(THIS_ DWORD,LPDIRECT3DTEXTURE2 *) PURE;
  628.     STDMETHOD(SetTexture)(THIS_ DWORD,LPDIRECT3DTEXTURE2) PURE;
  629.     STDMETHOD(GetTextureStageState)(THIS_ DWORD,D3DTEXTURESTAGESTATETYPE,LPDWORD) PURE;
  630.     STDMETHOD(SetTextureStageState)(THIS_ DWORD,D3DTEXTURESTAGESTATETYPE,DWORD) PURE;
  631.     STDMETHOD(ValidateDevice)(THIS_ LPDWORD) PURE;
  632. };
  633.  
  634. typedef struct IDirect3DDevice3 *LPDIRECT3DDEVICE3;
  635.  
  636. #if !defined(__cplusplus) || defined(CINTERFACE)
  637. #define IDirect3DDevice3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  638. #define IDirect3DDevice3_AddRef(p) (p)->lpVtbl->AddRef(p)
  639. #define IDirect3DDevice3_Release(p) (p)->lpVtbl->Release(p)
  640. #define IDirect3DDevice3_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
  641. #define IDirect3DDevice3_GetStats(p,a) (p)->lpVtbl->GetStats(p,a)
  642. #define IDirect3DDevice3_AddViewport(p,a) (p)->lpVtbl->AddViewport(p,a)
  643. #define IDirect3DDevice3_DeleteViewport(p,a) (p)->lpVtbl->DeleteViewport(p,a)
  644. #define IDirect3DDevice3_NextViewport(p,a,b,c) (p)->lpVtbl->NextViewport(p,a,b,c)
  645. #define IDirect3DDevice3_EnumTextureFormats(p,a,b) (p)->lpVtbl->EnumTextureFormats(p,a,b)
  646. #define IDirect3DDevice3_BeginScene(p) (p)->lpVtbl->BeginScene(p)
  647. #define IDirect3DDevice3_EndScene(p) (p)->lpVtbl->EndScene(p)
  648. #define IDirect3DDevice3_GetDirect3D(p,a) (p)->lpVtbl->GetDirect3D(p,a)
  649. #define IDirect3DDevice3_SetCurrentViewport(p,a) (p)->lpVtbl->SetCurrentViewport(p,a)
  650. #define IDirect3DDevice3_GetCurrentViewport(p,a) (p)->lpVtbl->GetCurrentViewport(p,a)
  651. #define IDirect3DDevice3_SetRenderTarget(p,a,b) (p)->lpVtbl->SetRenderTarget(p,a,b)
  652. #define IDirect3DDevice3_GetRenderTarget(p,a) (p)->lpVtbl->GetRenderTarget(p,a)
  653. #define IDirect3DDevice3_Begin(p,a,b,c) (p)->lpVtbl->Begin(p,a,b,c)
  654. #define IDirect3DDevice3_BeginIndexed(p,a,b,c,d,e) (p)->lpVtbl->BeginIndexed(p,a,b,c,d,e)
  655. #define IDirect3DDevice3_Vertex(p,a) (p)->lpVtbl->Vertex(p,a)
  656. #define IDirect3DDevice3_Index(p,a) (p)->lpVtbl->Index(p,a)
  657. #define IDirect3DDevice3_End(p,a) (p)->lpVtbl->End(p,a)
  658. #define IDirect3DDevice3_GetRenderState(p,a,b) (p)->lpVtbl->GetRenderState(p,a,b)
  659. #define IDirect3DDevice3_SetRenderState(p,a,b) (p)->lpVtbl->SetRenderState(p,a,b)
  660. #define IDirect3DDevice3_GetLightState(p,a,b) (p)->lpVtbl->GetLightState(p,a,b)
  661. #define IDirect3DDevice3_SetLightState(p,a,b) (p)->lpVtbl->SetLightState(p,a,b)
  662. #define IDirect3DDevice3_SetTransform(p,a,b) (p)->lpVtbl->SetTransform(p,a,b)
  663. #define IDirect3DDevice3_GetTransform(p,a,b) (p)->lpVtbl->GetTransform(p,a,b)
  664. #define IDirect3DDevice3_MultiplyTransform(p,a,b) (p)->lpVtbl->MultiplyTransform(p,a,b)
  665. #define IDirect3DDevice3_DrawPrimitive(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitive(p,a,b,c,d,e)
  666. #define IDirect3DDevice3_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitive(p,a,b,c,d,e,f,g)
  667. #define IDirect3DDevice3_SetClipStatus(p,a) (p)->lpVtbl->SetClipStatus(p,a)
  668. #define IDirect3DDevice3_GetClipStatus(p,a) (p)->lpVtbl->GetClipStatus(p,a)
  669. #define IDirect3DDevice3_DrawPrimitiveStrided(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitiveStrided(p,a,b,c,d,e)
  670. #define IDirect3DDevice3_DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g)
  671. #define IDirect3DDevice3_DrawPrimitiveVB(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitiveVB(p,a,b,c,d,e)
  672. #define IDirect3DDevice3_DrawIndexedPrimitiveVB(p,a,b,c,d,e) (p)->lpVtbl->DrawIndexedPrimitiveVB(p,a,b,c,d,e)
  673. #define IDirect3DDevice3_ComputeSphereVisibility(p,a,b,c,d,e) (p)->lpVtbl->ComputeSphereVisibility(p,a,b,c,d,e)
  674. #define IDirect3DDevice3_GetTexture(p,a,b) (p)->lpVtbl->GetTexture(p,a,b)
  675. #define IDirect3DDevice3_SetTexture(p,a,b) (p)->lpVtbl->SetTexture(p,a,b)
  676. #define IDirect3DDevice3_GetTextureStageState(p,a,b,c) (p)->lpVtbl->GetTextureStageState(p,a,b,c)
  677. #define IDirect3DDevice3_SetTextureStageState(p,a,b,c) (p)->lpVtbl->SetTextureStageState(p,a,b,c)
  678. #define IDirect3DDevice3_ValidateDevice(p,a) (p)->lpVtbl->ValidateDevice(p,a)
  679. #else
  680. #define IDirect3DDevice3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  681. #define IDirect3DDevice3_AddRef(p) (p)->AddRef()
  682. #define IDirect3DDevice3_Release(p) (p)->Release()
  683. #define IDirect3DDevice3_GetCaps(p,a,b) (p)->GetCaps(a,b)
  684. #define IDirect3DDevice3_GetStats(p,a) (p)->GetStats(a)
  685. #define IDirect3DDevice3_AddViewport(p,a) (p)->AddViewport(a)
  686. #define IDirect3DDevice3_DeleteViewport(p,a) (p)->DeleteViewport(a)
  687. #define IDirect3DDevice3_NextViewport(p,a,b,c) (p)->NextViewport(a,b,c)
  688. #define IDirect3DDevice3_EnumTextureFormats(p,a,b) (p)->EnumTextureFormats(a,b)
  689. #define IDirect3DDevice3_BeginScene(p) (p)->BeginScene()
  690. #define IDirect3DDevice3_EndScene(p) (p)->EndScene()
  691. #define IDirect3DDevice3_GetDirect3D(p,a) (p)->GetDirect3D(a)
  692. #define IDirect3DDevice3_SetCurrentViewport(p,a) (p)->SetCurrentViewport(a)
  693. #define IDirect3DDevice3_GetCurrentViewport(p,a) (p)->GetCurrentViewport(a)
  694. #define IDirect3DDevice3_SetRenderTarget(p,a,b) (p)->SetRenderTarget(a,b)
  695. #define IDirect3DDevice3_GetRenderTarget(p,a) (p)->GetRenderTarget(a)
  696. #define IDirect3DDevice3_Begin(p,a,b,c) (p)->Begin(a,b,c)
  697. #define IDirect3DDevice3_BeginIndexed(p,a,b,c,d,e) (p)->BeginIndexed(a,b,c,d,e)
  698. #define IDirect3DDevice3_Vertex(p,a) (p)->Vertex(a)
  699. #define IDirect3DDevice3_Index(p,a) (p)->Index(a)
  700. #define IDirect3DDevice3_End(p,a) (p)->End(a)
  701. #define IDirect3DDevice3_GetRenderState(p,a,b) (p)->GetRenderState(a,b)
  702. #define IDirect3DDevice3_SetRenderState(p,a,b) (p)->SetRenderState(a,b)
  703. #define IDirect3DDevice3_GetLightState(p,a,b) (p)->GetLightState(a,b)
  704. #define IDirect3DDevice3_SetLightState(p,a,b) (p)->SetLightState(a,b)
  705. #define IDirect3DDevice3_SetTransform(p,a,b) (p)->SetTransform(a,b)
  706. #define IDirect3DDevice3_GetTransform(p,a,b) (p)->GetTransform(a,b)
  707. #define IDirect3DDevice3_MultiplyTransform(p,a,b) (p)->MultiplyTransform(a,b)
  708. #define IDirect3DDevice3_DrawPrimitive(p,a,b,c,d,e) (p)->DrawPrimitive(a,b,c,d,e)
  709. #define IDirect3DDevice3_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitive(a,b,c,d,e,f,g)
  710. #define IDirect3DDevice3_SetClipStatus(p,a) (p)->SetClipStatus(a)
  711. #define IDirect3DDevice3_GetClipStatus(p,a) (p)->GetClipStatus(a)
  712. #define IDirect3DDevice3_DrawPrimitiveStrided(p,a,b,c,d,e) (p)->DrawPrimitiveStrided(a,b,c,d,e)
  713. #define IDirect3DDevice3_DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitiveStrided(a,b,c,d,e,f,g)
  714. #define IDirect3DDevice3_DrawPrimitiveVB(p,a,b,c,d,e) (p)->DrawPrimitiveVB(a,b,c,d,e)
  715. #define IDirect3DDevice3_DrawIndexedPrimitiveVB(p,a,b,c,d,e) (p)->DrawIndexedPrimitiveVB(a,b,c,d,e)
  716. #define IDirect3DDevice3_ComputeSphereVisibility(p,a,b,c,d,e) (p)->ComputeSphereVisibility(a,b,c,d,e)
  717. #define IDirect3DDevice3_GetTexture(p,a,b) (p)->GetTexture(a,b)
  718. #define IDirect3DDevice3_SetTexture(p,a,b) (p)->SetTexture(a,b)
  719. #define IDirect3DDevice3_GetTextureStageState(p,a,b,c) (p)->GetTextureStageState(a,b,c)
  720. #define IDirect3DDevice3_SetTextureStageState(p,a,b,c) (p)->SetTextureStageState(a,b,c)
  721. #define IDirect3DDevice3_ValidateDevice(p,a) (p)->ValidateDevice(a)
  722. #endif
  723. #endif /* DIRECT3D_VERSION >= 0x0600 */
  724.  
  725. #if(DIRECT3D_VERSION >= 0x0700)
  726. #undef INTERFACE
  727. #define INTERFACE IDirect3DDevice7
  728.  
  729. DECLARE_INTERFACE_(IDirect3DDevice7, IUnknown)
  730. {
  731.     /*** IUnknown methods ***/
  732.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  733.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  734.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  735.  
  736.     /*** IDirect3DDevice7 methods ***/
  737.     STDMETHOD(GetCaps)(THIS_ LPD3DDEVICEDESC7) PURE;
  738.     STDMETHOD(EnumTextureFormats)(THIS_ LPD3DENUMPIXELFORMATSCALLBACK,LPVOID) PURE;
  739.     STDMETHOD(BeginScene)(THIS) PURE;
  740.     STDMETHOD(EndScene)(THIS) PURE;
  741.     STDMETHOD(GetDirect3D)(THIS_ LPDIRECT3D7*) PURE;
  742.     STDMETHOD(SetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE7,DWORD) PURE;
  743.     STDMETHOD(GetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE7 *) PURE;
  744.     STDMETHOD(Clear)(THIS_ DWORD,LPD3DRECT,DWORD,D3DCOLOR,D3DVALUE,DWORD) PURE;
  745.     STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE;
  746.     STDMETHOD(GetTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE;
  747.     STDMETHOD(SetViewport)(THIS_ LPD3DVIEWPORT7) PURE;
  748.     STDMETHOD(MultiplyTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE;
  749.     STDMETHOD(GetViewport)(THIS_ LPD3DVIEWPORT7) PURE;
  750.     STDMETHOD(SetMaterial)(THIS_ LPD3DMATERIAL7) PURE;
  751.     STDMETHOD(GetMaterial)(THIS_ LPD3DMATERIAL7) PURE;
  752.     STDMETHOD(SetLight)(THIS_ DWORD,LPD3DLIGHT7) PURE;
  753.     STDMETHOD(GetLight)(THIS_ DWORD,LPD3DLIGHT7) PURE;
  754.     STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE,DWORD) PURE;
  755.     STDMETHOD(GetRenderState)(THIS_ D3DRENDERSTATETYPE,LPDWORD) PURE;
  756.     STDMETHOD(BeginStateBlock)(THIS) PURE;
  757.     STDMETHOD(EndStateBlock)(THIS_ LPDWORD) PURE;
  758.     STDMETHOD(PreLoad)(THIS_ LPDIRECTDRAWSURFACE7) PURE;
  759.     STDMETHOD(DrawPrimitive)(THIS_ D3DPRIMITIVETYPE,DWORD,LPVOID,DWORD,DWORD) PURE;
  760.     STDMETHOD(DrawIndexedPrimitive)(THIS_ D3DPRIMITIVETYPE,DWORD,LPVOID,DWORD,LPWORD,DWORD,DWORD) PURE;
  761.     STDMETHOD(SetClipStatus)(THIS_ LPD3DCLIPSTATUS) PURE;
  762.     STDMETHOD(GetClipStatus)(THIS_ LPD3DCLIPSTATUS) PURE;
  763.     STDMETHOD(DrawPrimitiveStrided)(THIS_ D3DPRIMITIVETYPE,DWORD,LPD3DDRAWPRIMITIVESTRIDEDDATA,DWORD,DWORD) PURE;
  764.     STDMETHOD(DrawIndexedPrimitiveStrided)(THIS_ D3DPRIMITIVETYPE,DWORD,LPD3DDRAWPRIMITIVESTRIDEDDATA,DWORD,LPWORD,DWORD,DWORD) PURE;
  765.     STDMETHOD(DrawPrimitiveVB)(THIS_ D3DPRIMITIVETYPE,LPDIRECT3DVERTEXBUFFER7,DWORD,DWORD,DWORD) PURE;
  766.     STDMETHOD(DrawIndexedPrimitiveVB)(THIS_ D3DPRIMITIVETYPE,LPDIRECT3DVERTEXBUFFER7,DWORD,DWORD,LPWORD,DWORD,DWORD) PURE;
  767.     STDMETHOD(ComputeSphereVisibility)(THIS_ LPD3DVECTOR,LPD3DVALUE,DWORD,DWORD,LPDWORD) PURE;
  768.     STDMETHOD(GetTexture)(THIS_ DWORD,LPDIRECTDRAWSURFACE7 *) PURE;
  769.     STDMETHOD(SetTexture)(THIS_ DWORD,LPDIRECTDRAWSURFACE7) PURE;
  770.     STDMETHOD(GetTextureStageState)(THIS_ DWORD,D3DTEXTURESTAGESTATETYPE,LPDWORD) PURE;
  771.     STDMETHOD(SetTextureStageState)(THIS_ DWORD,D3DTEXTURESTAGESTATETYPE,DWORD) PURE;
  772.     STDMETHOD(ValidateDevice)(THIS_ LPDWORD) PURE;
  773.     STDMETHOD(ApplyStateBlock)(THIS_ DWORD) PURE;
  774.     STDMETHOD(CaptureStateBlock)(THIS_ DWORD) PURE;
  775.     STDMETHOD(DeleteStateBlock)(THIS_ DWORD) PURE;
  776.     STDMETHOD(CreateStateBlock)(THIS_ D3DSTATEBLOCKTYPE,LPDWORD) PURE;
  777.     STDMETHOD(Load)(THIS_ LPDIRECTDRAWSURFACE7,LPPOINT,LPDIRECTDRAWSURFACE7,LPRECT,DWORD) PURE;
  778.     STDMETHOD(LightEnable)(THIS_ DWORD,BOOL) PURE;
  779.     STDMETHOD(GetLightEnable)(THIS_ DWORD,BOOL*) PURE;
  780.     STDMETHOD(SetClipPlane)(THIS_ DWORD,D3DVALUE*) PURE;
  781.     STDMETHOD(GetClipPlane)(THIS_ DWORD,D3DVALUE*) PURE;
  782.     STDMETHOD(GetInfo)(THIS_ DWORD,LPVOID,DWORD) PURE;
  783. };
  784.  
  785. typedef struct IDirect3DDevice7 *LPDIRECT3DDEVICE7;
  786.  
  787. #if !defined(__cplusplus) || defined(CINTERFACE)
  788. #define IDirect3DDevice7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  789. #define IDirect3DDevice7_AddRef(p) (p)->lpVtbl->AddRef(p)
  790. #define IDirect3DDevice7_Release(p) (p)->lpVtbl->Release(p)
  791. #define IDirect3DDevice7_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
  792. #define IDirect3DDevice7_EnumTextureFormats(p,a,b) (p)->lpVtbl->EnumTextureFormats(p,a,b)
  793. #define IDirect3DDevice7_BeginScene(p) (p)->lpVtbl->BeginScene(p)
  794. #define IDirect3DDevice7_EndScene(p) (p)->lpVtbl->EndScene(p)
  795. #define IDirect3DDevice7_GetDirect3D(p,a) (p)->lpVtbl->GetDirect3D(p,a)
  796. #define IDirect3DDevice7_SetRenderTarget(p,a,b) (p)->lpVtbl->SetRenderTarget(p,a,b)
  797. #define IDirect3DDevice7_GetRenderTarget(p,a) (p)->lpVtbl->GetRenderTarget(p,a)
  798. #define IDirect3DDevice7_Clear(p,a,b,c,d,e,f) (p)->lpVtbl->Clear(p,a,b,c,d,e,f)
  799. #define IDirect3DDevice7_SetTransform(p,a,b) (p)->lpVtbl->SetTransform(p,a,b)
  800. #define IDirect3DDevice7_GetTransform(p,a,b) (p)->lpVtbl->GetTransform(p,a,b)
  801. #define IDirect3DDevice7_SetViewport(p,a) (p)->lpVtbl->SetViewport(p,a)
  802. #define IDirect3DDevice7_MultiplyTransform(p,a,b) (p)->lpVtbl->MultiplyTransform(p,a,b)
  803. #define IDirect3DDevice7_GetViewport(p,a) (p)->lpVtbl->GetViewport(p,a)
  804. #define IDirect3DDevice7_SetMaterial(p,a) (p)->lpVtbl->SetMaterial(p,a)
  805. #define IDirect3DDevice7_GetMaterial(p,a) (p)->lpVtbl->GetMaterial(p,a)
  806. #define IDirect3DDevice7_SetLight(p,a,b) (p)->lpVtbl->SetLight(p,a,b)
  807. #define IDirect3DDevice7_GetLight(p,a,b) (p)->lpVtbl->GetLight(p,a,b)
  808. #define IDirect3DDevice7_SetRenderState(p,a,b) (p)->lpVtbl->SetRenderState(p,a,b)
  809. #define IDirect3DDevice7_GetRenderState(p,a,b) (p)->lpVtbl->GetRenderState(p,a,b)
  810. #define IDirect3DDevice7_BeginStateBlock(p) (p)->lpVtbl->BeginStateBlock(p)
  811. #define IDirect3DDevice7_EndStateBlock(p,a) (p)->lpVtbl->EndStateBlock(p,a)
  812. #define IDirect3DDevice7_PreLoad(p,a) (p)->lpVtbl->PreLoad(p,a)
  813. #define IDirect3DDevice7_DrawPrimitive(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitive(p,a,b,c,d,e)
  814. #define IDirect3DDevice7_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitive(p,a,b,c,d,e,f,g)
  815. #define IDirect3DDevice7_SetClipStatus(p,a) (p)->lpVtbl->SetClipStatus(p,a)
  816. #define IDirect3DDevice7_GetClipStatus(p,a) (p)->lpVtbl->GetClipStatus(p,a)
  817. #define IDirect3DDevice7_DrawPrimitiveStrided(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitiveStrided(p,a,b,c,d,e)
  818. #define IDirect3DDevice7_DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g)
  819. #define IDirect3DDevice7_DrawPrimitiveVB(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitiveVB(p,a,b,c,d,e)
  820. #define IDirect3DDevice7_DrawIndexedPrimitiveVB(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitiveVB(p,a,b,c,d,e,f,g)
  821. #define IDirect3DDevice7_ComputeSphereVisibility(p,a,b,c,d,e) (p)->lpVtbl->ComputeSphereVisibility(p,a,b,c,d,e)
  822. #define IDirect3DDevice7_GetTexture(p,a,b) (p)->lpVtbl->GetTexture(p,a,b)
  823. #define IDirect3DDevice7_SetTexture(p,a,b) (p)->lpVtbl->SetTexture(p,a,b)
  824. #define IDirect3DDevice7_GetTextureStageState(p,a,b,c) (p)->lpVtbl->GetTextureStageState(p,a,b,c)
  825. #define IDirect3DDevice7_SetTextureStageState(p,a,b,c) (p)->lpVtbl->SetTextureStageState(p,a,b,c)
  826. #define IDirect3DDevice7_ValidateDevice(p,a) (p)->lpVtbl->ValidateDevice(p,a)
  827. #define IDirect3DDevice7_ApplyStateBlock(p,a) (p)->lpVtbl->ApplyStateBlock(p,a)
  828. #define IDirect3DDevice7_CaptureStateBlock(p,a) (p)->lpVtbl->CaptureStateBlock(p,a)
  829. #define IDirect3DDevice7_DeleteStateBlock(p,a) (p)->lpVtbl->DeleteStateBlock(p,a)
  830. #define IDirect3DDevice7_CreateStateBlock(p,a,b) (p)->lpVtbl->CreateStateBlock(p,a,b)
  831. #define IDirect3DDevice7_Load(p,a,b,c,d,e) (p)->lpVtbl->Load(p,a,b,c,d,e)
  832. #define IDirect3DDevice7_LightEnable(p,a,b) (p)->lpVtbl->LightEnable(p,a,b)
  833. #define IDirect3DDevice7_GetLightEnable(p,a,b) (p)->lpVtbl->GetLightEnable(p,a,b)
  834. #define IDirect3DDevice7_SetClipPlane(p,a,b) (p)->lpVtbl->SetClipPlane(p,a,b)
  835. #define IDirect3DDevice7_GetClipPlane(p,a,b) (p)->lpVtbl->GetClipPlane(p,a,b)
  836. #define IDirect3DDevice7_GetInfo(p,a,b,c) (p)->lpVtbl->GetInfo(p,a,b,c)
  837. #else
  838. #define IDirect3DDevice7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  839. #define IDirect3DDevice7_AddRef(p) (p)->AddRef()
  840. #define IDirect3DDevice7_Release(p) (p)->Release()
  841. #define IDirect3DDevice7_GetCaps(p,a) (p)->GetCaps(a)
  842. #define IDirect3DDevice7_EnumTextureFormats(p,a,b) (p)->EnumTextureFormats(a,b)
  843. #define IDirect3DDevice7_BeginScene(p) (p)->BeginScene()
  844. #define IDirect3DDevice7_EndScene(p) (p)->EndScene()
  845. #define IDirect3DDevice7_GetDirect3D(p,a) (p)->GetDirect3D(a)
  846. #define IDirect3DDevice7_SetRenderTarget(p,a,b) (p)->SetRenderTarget(a,b)
  847. #define IDirect3DDevice7_GetRenderTarget(p,a) (p)->GetRenderTarget(a)
  848. #define IDirect3DDevice7_Clear(p,a,b,c,d,e,f) (p)->Clear(a,b,c,d,e,f)
  849. #define IDirect3DDevice7_SetTransform(p,a,b) (p)->SetTransform(a,b)
  850. #define IDirect3DDevice7_GetTransform(p,a,b) (p)->GetTransform(a,b)
  851. #define IDirect3DDevice7_SetViewport(p,a) (p)->SetViewport(a)
  852. #define IDirect3DDevice7_MultiplyTransform(p,a,b) (p)->MultiplyTransform(a,b)
  853. #define IDirect3DDevice7_GetViewport(p,a) (p)->GetViewport(a)
  854. #define IDirect3DDevice7_SetMaterial(p,a) (p)->SetMaterial(a)
  855. #define IDirect3DDevice7_GetMaterial(p,a) (p)->GetMaterial(a)
  856. #define IDirect3DDevice7_SetLight(p,a,b) (p)->SetLight(a,b)
  857. #define IDirect3DDevice7_GetLight(p,a,b) (p)->GetLight(a,b)
  858. #define IDirect3DDevice7_SetRenderState(p,a,b) (p)->SetRenderState(a,b)
  859. #define IDirect3DDevice7_GetRenderState(p,a,b) (p)->GetRenderState(a,b)
  860. #define IDirect3DDevice7_BeginStateBlock(p) (p)->BeginStateBlock()
  861. #define IDirect3DDevice7_EndStateBlock(p,a) (p)->EndStateBlock(a)
  862. #define IDirect3DDevice7_PreLoad(p,a) (p)->PreLoad(a)
  863. #define IDirect3DDevice7_DrawPrimitive(p,a,b,c,d,e) (p)->DrawPrimitive(a,b,c,d,e)
  864. #define IDirect3DDevice7_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitive(a,b,c,d,e,f,g)
  865. #define IDirect3DDevice7_SetClipStatus(p,a) (p)->SetClipStatus(a)
  866. #define IDirect3DDevice7_GetClipStatus(p,a) (p)->GetClipStatus(a)
  867. #define IDirect3DDevice7_DrawPrimitiveStrided(p,a,b,c,d,e) (p)->DrawPrimitiveStrided(a,b,c,d,e)
  868. #define IDirect3DDevice7_DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitiveStrided(a,b,c,d,e,f,g)
  869. #define IDirect3DDevice7_DrawPrimitiveVB(p,a,b,c,d,e) (p)->DrawPrimitiveVB(a,b,c,d,e)
  870. #define IDirect3DDevice7_DrawIndexedPrimitiveVB(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitiveVB(a,b,c,d,e,f,g)
  871. #define IDirect3DDevice7_ComputeSphereVisibility(p,a,b,c,d,e) (p)->ComputeSphereVisibility(a,b,c,d,e)
  872. #define IDirect3DDevice7_GetTexture(p,a,b) (p)->GetTexture(a,b)
  873. #define IDirect3DDevice7_SetTexture(p,a,b) (p)->SetTexture(a,b)
  874. #define IDirect3DDevice7_GetTextureStageState(p,a,b,c) (p)->GetTextureStageState(a,b,c)
  875. #define IDirect3DDevice7_SetTextureStageState(p,a,b,c) (p)->SetTextureStageState(a,b,c)
  876. #define IDirect3DDevice7_ValidateDevice(p,a) (p)->ValidateDevice(a)
  877. #define IDirect3DDevice7_ApplyStateBlock(p,a) (p)->ApplyStateBlock(a)
  878. #define IDirect3DDevice7_CaptureStateBlock(p,a) (p)->CaptureStateBlock(a)
  879. #define IDirect3DDevice7_DeleteStateBlock(p,a) (p)->DeleteStateBlock(a)
  880. #define IDirect3DDevice7_CreateStateBlock(p,a,b) (p)->CreateStateBlock(a,b)
  881. #define IDirect3DDevice7_Load(p,a,b,c,d,e) (p)->Load(a,b,c,d,e)
  882. #define IDirect3DDevice7_LightEnable(p,a,b) (p)->LightEnable(a,b)
  883. #define IDirect3DDevice7_GetLightEnable(p,a,b) (p)->GetLightEnable(a,b)
  884. #define IDirect3DDevice7_SetClipPlane(p,a,b) (p)->SetClipPlane(a,b)
  885. #define IDirect3DDevice7_GetClipPlane(p,a,b) (p)->GetClipPlane(a,b)
  886. #define IDirect3DDevice7_GetInfo(p,a,b,c) (p)->GetInfo(a,b,c)
  887. #endif
  888. #endif /* DIRECT3D_VERSION >= 0x0700 */
  889.  
  890. /*
  891.  * Execute Buffer interface
  892.  */
  893. #undef INTERFACE
  894. #define INTERFACE IDirect3DExecuteBuffer
  895.  
  896. DECLARE_INTERFACE_(IDirect3DExecuteBuffer, IUnknown)
  897. {
  898.     /*** IUnknown methods ***/
  899.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  900.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  901.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  902.  
  903.     /*** IDirect3DExecuteBuffer methods ***/
  904.     STDMETHOD(Initialize)(THIS_ LPDIRECT3DDEVICE,LPD3DEXECUTEBUFFERDESC) PURE;
  905.     STDMETHOD(Lock)(THIS_ LPD3DEXECUTEBUFFERDESC) PURE;
  906.     STDMETHOD(Unlock)(THIS) PURE;
  907.     STDMETHOD(SetExecuteData)(THIS_ LPD3DEXECUTEDATA) PURE;
  908.     STDMETHOD(GetExecuteData)(THIS_ LPD3DEXECUTEDATA) PURE;
  909.     STDMETHOD(Validate)(THIS_ LPDWORD,LPD3DVALIDATECALLBACK,LPVOID,DWORD) PURE;
  910.     STDMETHOD(Optimize)(THIS_ DWORD) PURE;
  911. };
  912.  
  913. typedef struct IDirect3DExecuteBuffer *LPDIRECT3DEXECUTEBUFFER;
  914.  
  915. #if !defined(__cplusplus) || defined(CINTERFACE)
  916. #define IDirect3DExecuteBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  917. #define IDirect3DExecuteBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
  918. #define IDirect3DExecuteBuffer_Release(p) (p)->lpVtbl->Release(p)
  919. #define IDirect3DExecuteBuffer_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  920. #define IDirect3DExecuteBuffer_Lock(p,a) (p)->lpVtbl->Lock(p,a)
  921. #define IDirect3DExecuteBuffer_Unlock(p) (p)->lpVtbl->Unlock(p)
  922. #define IDirect3DExecuteBuffer_SetExecuteData(p,a) (p)->lpVtbl->SetExecuteData(p,a)
  923. #define IDirect3DExecuteBuffer_GetExecuteData(p,a) (p)->lpVtbl->GetExecuteData(p,a)
  924. #define IDirect3DExecuteBuffer_Validate(p,a,b,c,d) (p)->lpVtbl->Validate(p,a,b,c,d)
  925. #define IDirect3DExecuteBuffer_Optimize(p,a) (p)->lpVtbl->Optimize(p,a)
  926. #else
  927. #define IDirect3DExecuteBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  928. #define IDirect3DExecuteBuffer_AddRef(p) (p)->AddRef()
  929. #define IDirect3DExecuteBuffer_Release(p) (p)->Release()
  930. #define IDirect3DExecuteBuffer_Initialize(p,a,b) (p)->Initialize(a,b)
  931. #define IDirect3DExecuteBuffer_Lock(p,a) (p)->Lock(a)
  932. #define IDirect3DExecuteBuffer_Unlock(p) (p)->Unlock()
  933. #define IDirect3DExecuteBuffer_SetExecuteData(p,a) (p)->SetExecuteData(a)
  934. #define IDirect3DExecuteBuffer_GetExecuteData(p,a) (p)->GetExecuteData(a)
  935. #define IDirect3DExecuteBuffer_Validate(p,a,b,c,d) (p)->Validate(a,b,c,d)
  936. #define IDirect3DExecuteBuffer_Optimize(p,a) (p)->Optimize(a)
  937. #endif
  938.  
  939. /*
  940.  * Light interfaces
  941.  */
  942. #undef INTERFACE
  943. #define INTERFACE IDirect3DLight
  944.  
  945. DECLARE_INTERFACE_(IDirect3DLight, IUnknown)
  946. {
  947.     /*** IUnknown methods ***/
  948.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  949.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  950.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  951.  
  952.     /*** IDirect3DLight methods ***/
  953.     STDMETHOD(Initialize)(THIS_ LPDIRECT3D) PURE;
  954.     STDMETHOD(SetLight)(THIS_ LPD3DLIGHT) PURE;
  955.     STDMETHOD(GetLight)(THIS_ LPD3DLIGHT) PURE;
  956. };
  957.  
  958. typedef struct IDirect3DLight *LPDIRECT3DLIGHT;
  959.  
  960. #if !defined(__cplusplus) || defined(CINTERFACE)
  961. #define IDirect3DLight_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  962. #define IDirect3DLight_AddRef(p) (p)->lpVtbl->AddRef(p)
  963. #define IDirect3DLight_Release(p) (p)->lpVtbl->Release(p)
  964. #define IDirect3DLight_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
  965. #define IDirect3DLight_SetLight(p,a) (p)->lpVtbl->SetLight(p,a)
  966. #define IDirect3DLight_GetLight(p,a) (p)->lpVtbl->GetLight(p,a)
  967. #else
  968. #define IDirect3DLight_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  969. #define IDirect3DLight_AddRef(p) (p)->AddRef()
  970. #define IDirect3DLight_Release(p) (p)->Release()
  971. #define IDirect3DLight_Initialize(p,a) (p)->Initialize(a)
  972. #define IDirect3DLight_SetLight(p,a) (p)->SetLight(a)
  973. #define IDirect3DLight_GetLight(p,a) (p)->GetLight(a)
  974. #endif
  975.  
  976. /*
  977.  * Material interfaces
  978.  */
  979. #undef INTERFACE
  980. #define INTERFACE IDirect3DMaterial
  981.  
  982. DECLARE_INTERFACE_(IDirect3DMaterial, IUnknown)
  983. {
  984.     /*** IUnknown methods ***/
  985.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  986.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  987.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  988.  
  989.     /*** IDirect3DMaterial methods ***/
  990.     STDMETHOD(Initialize)(THIS_ LPDIRECT3D) PURE;
  991.     STDMETHOD(SetMaterial)(THIS_ LPD3DMATERIAL) PURE;
  992.     STDMETHOD(GetMaterial)(THIS_ LPD3DMATERIAL) PURE;
  993.     STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE,LPD3DMATERIALHANDLE) PURE;
  994.     STDMETHOD(Reserve)(THIS) PURE;
  995.     STDMETHOD(Unreserve)(THIS) PURE;
  996. };
  997.  
  998. typedef struct IDirect3DMaterial *LPDIRECT3DMATERIAL;
  999.  
  1000. #if !defined(__cplusplus) || defined(CINTERFACE)
  1001. #define IDirect3DMaterial_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1002. #define IDirect3DMaterial_AddRef(p) (p)->lpVtbl->AddRef(p)
  1003. #define IDirect3DMaterial_Release(p) (p)->lpVtbl->Release(p)
  1004. #define IDirect3DMaterial_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
  1005. #define IDirect3DMaterial_SetMaterial(p,a) (p)->lpVtbl->SetMaterial(p,a)
  1006. #define IDirect3DMaterial_GetMaterial(p,a) (p)->lpVtbl->GetMaterial(p,a)
  1007. #define IDirect3DMaterial_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b)
  1008. #define IDirect3DMaterial_Reserve(p) (p)->lpVtbl->Reserve(p)
  1009. #define IDirect3DMaterial_Unreserve(p) (p)->lpVtbl->Unreserve(p)
  1010. #else
  1011. #define IDirect3DMaterial_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1012. #define IDirect3DMaterial_AddRef(p) (p)->AddRef()
  1013. #define IDirect3DMaterial_Release(p) (p)->Release()
  1014. #define IDirect3DMaterial_Initialize(p,a) (p)->Initialize(a)
  1015. #define IDirect3DMaterial_SetMaterial(p,a) (p)->SetMaterial(a)
  1016. #define IDirect3DMaterial_GetMaterial(p,a) (p)->GetMaterial(a)
  1017. #define IDirect3DMaterial_GetHandle(p,a,b) (p)->GetHandle(a,b)
  1018. #define IDirect3DMaterial_Reserve(p) (p)->Reserve()
  1019. #define IDirect3DMaterial_Unreserve(p) (p)->Unreserve()
  1020. #endif
  1021.  
  1022. #if(DIRECT3D_VERSION >= 0x0500)
  1023. #undef INTERFACE
  1024. #define INTERFACE IDirect3DMaterial2
  1025.  
  1026. DECLARE_INTERFACE_(IDirect3DMaterial2, IUnknown)
  1027. {
  1028.     /*** IUnknown methods ***/
  1029.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  1030.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1031.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1032.  
  1033.     /*** IDirect3DMaterial2 methods ***/
  1034.     STDMETHOD(SetMaterial)(THIS_ LPD3DMATERIAL) PURE;
  1035.     STDMETHOD(GetMaterial)(THIS_ LPD3DMATERIAL) PURE;
  1036.     STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE2,LPD3DMATERIALHANDLE) PURE;
  1037. };
  1038.  
  1039. typedef struct IDirect3DMaterial2 *LPDIRECT3DMATERIAL2;
  1040.  
  1041. #if !defined(__cplusplus) || defined(CINTERFACE)
  1042. #define IDirect3DMaterial2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1043. #define IDirect3DMaterial2_AddRef(p) (p)->lpVtbl->AddRef(p)
  1044. #define IDirect3DMaterial2_Release(p) (p)->lpVtbl->Release(p)
  1045. #define IDirect3DMaterial2_SetMaterial(p,a) (p)->lpVtbl->SetMaterial(p,a)
  1046. #define IDirect3DMaterial2_GetMaterial(p,a) (p)->lpVtbl->GetMaterial(p,a)
  1047. #define IDirect3DMaterial2_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b)
  1048. #else
  1049. #define IDirect3DMaterial2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1050. #define IDirect3DMaterial2_AddRef(p) (p)->AddRef()
  1051. #define IDirect3DMaterial2_Release(p) (p)->Release()
  1052. #define IDirect3DMaterial2_SetMaterial(p,a) (p)->SetMaterial(a)
  1053. #define IDirect3DMaterial2_GetMaterial(p,a) (p)->GetMaterial(a)
  1054. #define IDirect3DMaterial2_GetHandle(p,a,b) (p)->GetHandle(a,b)
  1055. #endif
  1056. #endif /* DIRECT3D_VERSION >= 0x0500 */
  1057.  
  1058. #if(DIRECT3D_VERSION >= 0x0600)
  1059. #undef INTERFACE
  1060. #define INTERFACE IDirect3DMaterial3
  1061.  
  1062. DECLARE_INTERFACE_(IDirect3DMaterial3, IUnknown)
  1063. {
  1064.     /*** IUnknown methods ***/
  1065.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  1066.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1067.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1068.  
  1069.     /*** IDirect3DMaterial3 methods ***/
  1070.     STDMETHOD(SetMaterial)(THIS_ LPD3DMATERIAL) PURE;
  1071.     STDMETHOD(GetMaterial)(THIS_ LPD3DMATERIAL) PURE;
  1072.     STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE3,LPD3DMATERIALHANDLE) PURE;
  1073. };
  1074.  
  1075. typedef struct IDirect3DMaterial3 *LPDIRECT3DMATERIAL3;
  1076.  
  1077. #if !defined(__cplusplus) || defined(CINTERFACE)
  1078. #define IDirect3DMaterial3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1079. #define IDirect3DMaterial3_AddRef(p) (p)->lpVtbl->AddRef(p)
  1080. #define IDirect3DMaterial3_Release(p) (p)->lpVtbl->Release(p)
  1081. #define IDirect3DMaterial3_SetMaterial(p,a) (p)->lpVtbl->SetMaterial(p,a)
  1082. #define IDirect3DMaterial3_GetMaterial(p,a) (p)->lpVtbl->GetMaterial(p,a)
  1083. #define IDirect3DMaterial3_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b)
  1084. #else
  1085. #define IDirect3DMaterial3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1086. #define IDirect3DMaterial3_AddRef(p) (p)->AddRef()
  1087. #define IDirect3DMaterial3_Release(p) (p)->Release()
  1088. #define IDirect3DMaterial3_SetMaterial(p,a) (p)->SetMaterial(a)
  1089. #define IDirect3DMaterial3_GetMaterial(p,a) (p)->GetMaterial(a)
  1090. #define IDirect3DMaterial3_GetHandle(p,a,b) (p)->GetHandle(a,b)
  1091. #endif
  1092. #endif /* DIRECT3D_VERSION >= 0x0600 */
  1093.  
  1094. /*
  1095.  * Texture interfaces
  1096.  */
  1097. #undef INTERFACE
  1098. #define INTERFACE IDirect3DTexture
  1099.  
  1100. DECLARE_INTERFACE_(IDirect3DTexture, IUnknown)
  1101. {
  1102.     /*** IUnknown methods ***/
  1103.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  1104.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1105.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1106.  
  1107.     /*** IDirect3DTexture methods ***/
  1108.     STDMETHOD(Initialize)(THIS_ LPDIRECT3DDEVICE,LPDIRECTDRAWSURFACE) PURE;
  1109.     STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE,LPD3DTEXTUREHANDLE) PURE;
  1110.     STDMETHOD(PaletteChanged)(THIS_ DWORD,DWORD) PURE;
  1111.     STDMETHOD(Load)(THIS_ LPDIRECT3DTEXTURE) PURE;
  1112.     STDMETHOD(Unload)(THIS) PURE;
  1113. };
  1114.  
  1115. typedef struct IDirect3DTexture *LPDIRECT3DTEXTURE;
  1116.  
  1117. #if !defined(__cplusplus) || defined(CINTERFACE)
  1118. #define IDirect3DTexture_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1119. #define IDirect3DTexture_AddRef(p) (p)->lpVtbl->AddRef(p)
  1120. #define IDirect3DTexture_Release(p) (p)->lpVtbl->Release(p)
  1121. #define IDirect3DTexture_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  1122. #define IDirect3DTexture_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b)
  1123. #define IDirect3DTexture_PaletteChanged(p,a,b) (p)->lpVtbl->PaletteChanged(p,a,b)
  1124. #define IDirect3DTexture_Load(p,a) (p)->lpVtbl->Load(p,a)
  1125. #define IDirect3DTexture_Unload(p) (p)->lpVtbl->Unload(p)
  1126. #else
  1127. #define IDirect3DTexture_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1128. #define IDirect3DTexture_AddRef(p) (p)->AddRef()
  1129. #define IDirect3DTexture_Release(p) (p)->Release()
  1130. #define IDirect3DTexture_Initialize(p,a,b) (p)->Initialize(a,b)
  1131. #define IDirect3DTexture_GetHandle(p,a,b) (p)->GetHandle(a,b)
  1132. #define IDirect3DTexture_PaletteChanged(p,a,b) (p)->PaletteChanged(a,b)
  1133. #define IDirect3DTexture_Load(p,a) (p)->Load(a)
  1134. #define IDirect3DTexture_Unload(p) (p)->Unload()
  1135. #endif
  1136.  
  1137. #if(DIRECT3D_VERSION >= 0x0500)
  1138. #undef INTERFACE
  1139. #define INTERFACE IDirect3DTexture2
  1140.  
  1141. DECLARE_INTERFACE_(IDirect3DTexture2, IUnknown)
  1142. {
  1143.     /*** IUnknown methods ***/
  1144.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  1145.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1146.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1147.  
  1148.     /*** IDirect3DTexture2 methods ***/
  1149.     STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE2,LPD3DTEXTUREHANDLE) PURE;
  1150.     STDMETHOD(PaletteChanged)(THIS_ DWORD,DWORD) PURE;
  1151.     STDMETHOD(Load)(THIS_ LPDIRECT3DTEXTURE2) PURE;
  1152. };
  1153.  
  1154. typedef struct IDirect3DTexture2 *LPDIRECT3DTEXTURE2;
  1155.  
  1156. #if !defined(__cplusplus) || defined(CINTERFACE)
  1157. #define IDirect3DTexture2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1158. #define IDirect3DTexture2_AddRef(p) (p)->lpVtbl->AddRef(p)
  1159. #define IDirect3DTexture2_Release(p) (p)->lpVtbl->Release(p)
  1160. #define IDirect3DTexture2_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b)
  1161. #define IDirect3DTexture2_PaletteChanged(p,a,b) (p)->lpVtbl->PaletteChanged(p,a,b)
  1162. #define IDirect3DTexture2_Load(p,a) (p)->lpVtbl->Load(p,a)
  1163. #else
  1164. #define IDirect3DTexture2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1165. #define IDirect3DTexture2_AddRef(p) (p)->AddRef()
  1166. #define IDirect3DTexture2_Release(p) (p)->Release()
  1167. #define IDirect3DTexture2_GetHandle(p,a,b) (p)->GetHandle(a,b)
  1168. #define IDirect3DTexture2_PaletteChanged(p,a,b) (p)->PaletteChanged(a,b)
  1169. #define IDirect3DTexture2_Load(p,a) (p)->Load(a)
  1170. #endif
  1171. #endif /* DIRECT3D_VERSION >= 0x0500 */
  1172.  
  1173. /*
  1174.  * Viewport interfaces
  1175.  */
  1176. #undef INTERFACE
  1177. #define INTERFACE IDirect3DViewport
  1178.  
  1179. DECLARE_INTERFACE_(IDirect3DViewport, IUnknown)
  1180. {
  1181.     /*** IUnknown methods ***/
  1182.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  1183.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1184.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1185.  
  1186.     /*** IDirect3DViewport methods ***/
  1187.     STDMETHOD(Initialize)(THIS_ LPDIRECT3D) PURE;
  1188.     STDMETHOD(GetViewport)(THIS_ LPD3DVIEWPORT) PURE;
  1189.     STDMETHOD(SetViewport)(THIS_ LPD3DVIEWPORT) PURE;
  1190.     STDMETHOD(TransformVertices)(THIS_ DWORD,LPD3DTRANSFORMDATA,DWORD,LPDWORD) PURE;
  1191.     STDMETHOD(LightElements)(THIS_ DWORD,LPD3DLIGHTDATA) PURE;
  1192.     STDMETHOD(SetBackground)(THIS_ D3DMATERIALHANDLE) PURE;
  1193.     STDMETHOD(GetBackground)(THIS_ LPD3DMATERIALHANDLE,LPBOOL) PURE;
  1194.     STDMETHOD(SetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE) PURE;
  1195.     STDMETHOD(GetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE*,LPBOOL) PURE;
  1196.     STDMETHOD(Clear)(THIS_ DWORD,LPD3DRECT,DWORD) PURE;
  1197.     STDMETHOD(AddLight)(THIS_ LPDIRECT3DLIGHT) PURE;
  1198.     STDMETHOD(DeleteLight)(THIS_ LPDIRECT3DLIGHT) PURE;
  1199.     STDMETHOD(NextLight)(THIS_ LPDIRECT3DLIGHT,LPDIRECT3DLIGHT*,DWORD) PURE;
  1200. };
  1201.  
  1202. typedef struct IDirect3DViewport *LPDIRECT3DVIEWPORT;
  1203.  
  1204. #if !defined(__cplusplus) || defined(CINTERFACE)
  1205. #define IDirect3DViewport_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1206. #define IDirect3DViewport_AddRef(p) (p)->lpVtbl->AddRef(p)
  1207. #define IDirect3DViewport_Release(p) (p)->lpVtbl->Release(p)
  1208. #define IDirect3DViewport_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
  1209. #define IDirect3DViewport_GetViewport(p,a) (p)->lpVtbl->GetViewport(p,a)
  1210. #define IDirect3DViewport_SetViewport(p,a) (p)->lpVtbl->SetViewport(p,a)
  1211. #define IDirect3DViewport_TransformVertices(p,a,b,c,d) (p)->lpVtbl->TransformVertices(p,a,b,c,d)
  1212. #define IDirect3DViewport_LightElements(p,a,b) (p)->lpVtbl->LightElements(p,a,b)
  1213. #define IDirect3DViewport_SetBackground(p,a) (p)->lpVtbl->SetBackground(p,a)
  1214. #define IDirect3DViewport_GetBackground(p,a,b) (p)->lpVtbl->GetBackground(p,a,b)
  1215. #define IDirect3DViewport_SetBackgroundDepth(p,a) (p)->lpVtbl->SetBackgroundDepth(p,a)
  1216. #define IDirect3DViewport_GetBackgroundDepth(p,a,b) (p)->lpVtbl->GetBackgroundDepth(p,a,b)
  1217. #define IDirect3DViewport_Clear(p,a,b,c) (p)->lpVtbl->Clear(p,a,b,c)
  1218. #define IDirect3DViewport_AddLight(p,a) (p)->lpVtbl->AddLight(p,a)
  1219. #define IDirect3DViewport_DeleteLight(p,a) (p)->lpVtbl->DeleteLight(p,a)
  1220. #define IDirect3DViewport_NextLight(p,a,b,c) (p)->lpVtbl->NextLight(p,a,b,c)
  1221. #else
  1222. #define IDirect3DViewport_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1223. #define IDirect3DViewport_AddRef(p) (p)->AddRef()
  1224. #define IDirect3DViewport_Release(p) (p)->Release()
  1225. #define IDirect3DViewport_Initialize(p,a) (p)->Initialize(a)
  1226. #define IDirect3DViewport_GetViewport(p,a) (p)->GetViewport(a)
  1227. #define IDirect3DViewport_SetViewport(p,a) (p)->SetViewport(a)
  1228. #define IDirect3DViewport_TransformVertices(p,a,b,c,d) (p)->TransformVertices(a,b,c,d)
  1229. #define IDirect3DViewport_LightElements(p,a,b) (p)->LightElements(a,b)
  1230. #define IDirect3DViewport_SetBackground(p,a) (p)->SetBackground(a)
  1231. #define IDirect3DViewport_GetBackground(p,a,b) (p)->GetBackground(a,b)
  1232. #define IDirect3DViewport_SetBackgroundDepth(p,a) (p)->SetBackgroundDepth(a)
  1233. #define IDirect3DViewport_GetBackgroundDepth(p,a,b) (p)->GetBackgroundDepth(a,b)
  1234. #define IDirect3DViewport_Clear(p,a,b,c) (p)->Clear(a,b,c)
  1235. #define IDirect3DViewport_AddLight(p,a) (p)->AddLight(a)
  1236. #define IDirect3DViewport_DeleteLight(p,a) (p)->DeleteLight(a)
  1237. #define IDirect3DViewport_NextLight(p,a,b,c) (p)->NextLight(a,b,c)
  1238. #endif
  1239.  
  1240. #if(DIRECT3D_VERSION >= 0x0500)
  1241. #undef INTERFACE
  1242. #define INTERFACE IDirect3DViewport2
  1243.  
  1244. DECLARE_INTERFACE_(IDirect3DViewport2, IDirect3DViewport)
  1245. {
  1246.     /*** IUnknown methods ***/
  1247.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  1248.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1249.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1250.  
  1251.     /*** IDirect3DViewport methods ***/
  1252.     STDMETHOD(Initialize)(THIS_ LPDIRECT3D) PURE;
  1253.     STDMETHOD(GetViewport)(THIS_ LPD3DVIEWPORT) PURE;
  1254.     STDMETHOD(SetViewport)(THIS_ LPD3DVIEWPORT) PURE;
  1255.     STDMETHOD(TransformVertices)(THIS_ DWORD,LPD3DTRANSFORMDATA,DWORD,LPDWORD) PURE;
  1256.     STDMETHOD(LightElements)(THIS_ DWORD,LPD3DLIGHTDATA) PURE;
  1257.     STDMETHOD(SetBackground)(THIS_ D3DMATERIALHANDLE) PURE;
  1258.     STDMETHOD(GetBackground)(THIS_ LPD3DMATERIALHANDLE,LPBOOL) PURE;
  1259.     STDMETHOD(SetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE) PURE;
  1260.     STDMETHOD(GetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE*,LPBOOL) PURE;
  1261.     STDMETHOD(Clear)(THIS_ DWORD,LPD3DRECT,DWORD) PURE;
  1262.     STDMETHOD(AddLight)(THIS_ LPDIRECT3DLIGHT) PURE;
  1263.     STDMETHOD(DeleteLight)(THIS_ LPDIRECT3DLIGHT) PURE;
  1264.     STDMETHOD(NextLight)(THIS_ LPDIRECT3DLIGHT,LPDIRECT3DLIGHT*,DWORD) PURE;
  1265.     STDMETHOD(GetViewport2)(THIS_ LPD3DVIEWPORT2) PURE;
  1266.     STDMETHOD(SetViewport2)(THIS_ LPD3DVIEWPORT2) PURE;
  1267. };
  1268.  
  1269. typedef struct IDirect3DViewport2 *LPDIRECT3DVIEWPORT2;
  1270.  
  1271. #if !defined(__cplusplus) || defined(CINTERFACE)
  1272. #define IDirect3DViewport2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1273. #define IDirect3DViewport2_AddRef(p) (p)->lpVtbl->AddRef(p)
  1274. #define IDirect3DViewport2_Release(p) (p)->lpVtbl->Release(p)
  1275. #define IDirect3DViewport2_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
  1276. #define IDirect3DViewport2_GetViewport(p,a) (p)->lpVtbl->GetViewport(p,a)
  1277. #define IDirect3DViewport2_SetViewport(p,a) (p)->lpVtbl->SetViewport(p,a)
  1278. #define IDirect3DViewport2_TransformVertices(p,a,b,c,d) (p)->lpVtbl->TransformVertices(p,a,b,c,d)
  1279. #define IDirect3DViewport2_LightElements(p,a,b) (p)->lpVtbl->LightElements(p,a,b)
  1280. #define IDirect3DViewport2_SetBackground(p,a) (p)->lpVtbl->SetBackground(p,a)
  1281. #define IDirect3DViewport2_GetBackground(p,a,b) (p)->lpVtbl->GetBackground(p,a,b)
  1282. #define IDirect3DViewport2_SetBackgroundDepth(p,a) (p)->lpVtbl->SetBackgroundDepth(p,a)
  1283. #define IDirect3DViewport2_GetBackgroundDepth(p,a,b) (p)->lpVtbl->GetBackgroundDepth(p,a,b)
  1284. #define IDirect3DViewport2_Clear(p,a,b,c) (p)->lpVtbl->Clear(p,a,b,c)
  1285. #define IDirect3DViewport2_AddLight(p,a) (p)->lpVtbl->AddLight(p,a)
  1286. #define IDirect3DViewport2_DeleteLight(p,a) (p)->lpVtbl->DeleteLight(p,a)
  1287. #define IDirect3DViewport2_NextLight(p,a,b,c) (p)->lpVtbl->NextLight(p,a,b,c)
  1288. #define IDirect3DViewport2_GetViewport2(p,a) (p)->lpVtbl->GetViewport2(p,a)
  1289. #define IDirect3DViewport2_SetViewport2(p,a) (p)->lpVtbl->SetViewport2(p,a)
  1290. #else
  1291. #define IDirect3DViewport2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1292. #define IDirect3DViewport2_AddRef(p) (p)->AddRef()
  1293. #define IDirect3DViewport2_Release(p) (p)->Release()
  1294. #define IDirect3DViewport2_Initialize(p,a) (p)->Initialize(a)
  1295. #define IDirect3DViewport2_GetViewport(p,a) (p)->GetViewport(a)
  1296. #define IDirect3DViewport2_SetViewport(p,a) (p)->SetViewport(a)
  1297. #define IDirect3DViewport2_TransformVertices(p,a,b,c,d) (p)->TransformVertices(a,b,c,d)
  1298. #define IDirect3DViewport2_LightElements(p,a,b) (p)->LightElements(a,b)
  1299. #define IDirect3DViewport2_SetBackground(p,a) (p)->SetBackground(a)
  1300. #define IDirect3DViewport2_GetBackground(p,a,b) (p)->GetBackground(a,b)
  1301. #define IDirect3DViewport2_SetBackgroundDepth(p,a) (p)->SetBackgroundDepth(a)
  1302. #define IDirect3DViewport2_GetBackgroundDepth(p,a,b) (p)->GetBackgroundDepth(a,b)
  1303. #define IDirect3DViewport2_Clear(p,a,b,c) (p)->Clear(a,b,c)
  1304. #define IDirect3DViewport2_AddLight(p,a) (p)->AddLight(a)
  1305. #define IDirect3DViewport2_DeleteLight(p,a) (p)->DeleteLight(a)
  1306. #define IDirect3DViewport2_NextLight(p,a,b,c) (p)->NextLight(a,b,c)
  1307. #define IDirect3DViewport2_GetViewport2(p,a) (p)->GetViewport2(a)
  1308. #define IDirect3DViewport2_SetViewport2(p,a) (p)->SetViewport2(a)
  1309. #endif
  1310. #endif /* DIRECT3D_VERSION >= 0x0500 */
  1311.  
  1312. #if(DIRECT3D_VERSION >= 0x0600)
  1313.  
  1314. #undef INTERFACE
  1315. #define INTERFACE IDirect3DViewport3
  1316.  
  1317. DECLARE_INTERFACE_(IDirect3DViewport3, IDirect3DViewport2)
  1318. {
  1319.     /*** IUnknown methods ***/
  1320.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  1321.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1322.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1323.  
  1324.     /*** IDirect3DViewport2 methods ***/
  1325.     STDMETHOD(Initialize)(THIS_ LPDIRECT3D) PURE;
  1326.     STDMETHOD(GetViewport)(THIS_ LPD3DVIEWPORT) PURE;
  1327.     STDMETHOD(SetViewport)(THIS_ LPD3DVIEWPORT) PURE;
  1328.     STDMETHOD(TransformVertices)(THIS_ DWORD,LPD3DTRANSFORMDATA,DWORD,LPDWORD) PURE;
  1329.     STDMETHOD(LightElements)(THIS_ DWORD,LPD3DLIGHTDATA) PURE;
  1330.     STDMETHOD(SetBackground)(THIS_ D3DMATERIALHANDLE) PURE;
  1331.     STDMETHOD(GetBackground)(THIS_ LPD3DMATERIALHANDLE,LPBOOL) PURE;
  1332.     STDMETHOD(SetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE) PURE;
  1333.     STDMETHOD(GetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE*,LPBOOL) PURE;
  1334.     STDMETHOD(Clear)(THIS_ DWORD,LPD3DRECT,DWORD) PURE;
  1335.     STDMETHOD(AddLight)(THIS_ LPDIRECT3DLIGHT) PURE;
  1336.     STDMETHOD(DeleteLight)(THIS_ LPDIRECT3DLIGHT) PURE;
  1337.     STDMETHOD(NextLight)(THIS_ LPDIRECT3DLIGHT,LPDIRECT3DLIGHT*,DWORD) PURE;
  1338.     STDMETHOD(GetViewport2)(THIS_ LPD3DVIEWPORT2) PURE;
  1339.     STDMETHOD(SetViewport2)(THIS_ LPD3DVIEWPORT2) PURE;
  1340.     STDMETHOD(SetBackgroundDepth2)(THIS_ LPDIRECTDRAWSURFACE4) PURE;
  1341.     STDMETHOD(GetBackgroundDepth2)(THIS_ LPDIRECTDRAWSURFACE4*,LPBOOL) PURE;
  1342.     STDMETHOD(Clear2)(THIS_ DWORD,LPD3DRECT,DWORD,D3DCOLOR,D3DVALUE,DWORD) PURE;
  1343. };
  1344.  
  1345. typedef struct IDirect3DViewport3 *LPDIRECT3DVIEWPORT3;
  1346.  
  1347. #if !defined(__cplusplus) || defined(CINTERFACE)
  1348. #define IDirect3DViewport3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1349. #define IDirect3DViewport3_AddRef(p) (p)->lpVtbl->AddRef(p)
  1350. #define IDirect3DViewport3_Release(p) (p)->lpVtbl->Release(p)
  1351. #define IDirect3DViewport3_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
  1352. #define IDirect3DViewport3_GetViewport(p,a) (p)->lpVtbl->GetViewport(p,a)
  1353. #define IDirect3DViewport3_SetViewport(p,a) (p)->lpVtbl->SetViewport(p,a)
  1354. #define IDirect3DViewport3_TransformVertices(p,a,b,c,d) (p)->lpVtbl->TransformVertices(p,a,b,c,d)
  1355. #define IDirect3DViewport3_LightElements(p,a,b) (p)->lpVtbl->LightElements(p,a,b)
  1356. #define IDirect3DViewport3_SetBackground(p,a) (p)->lpVtbl->SetBackground(p,a)
  1357. #define IDirect3DViewport3_GetBackground(p,a,b) (p)->lpVtbl->GetBackground(p,a,b)
  1358. #define IDirect3DViewport3_SetBackgroundDepth(p,a) (p)->lpVtbl->SetBackgroundDepth(p,a)
  1359. #define IDirect3DViewport3_GetBackgroundDepth(p,a,b) (p)->lpVtbl->GetBackgroundDepth(p,a,b)
  1360. #define IDirect3DViewport3_Clear(p,a,b,c) (p)->lpVtbl->Clear(p,a,b,c)
  1361. #define IDirect3DViewport3_AddLight(p,a) (p)->lpVtbl->AddLight(p,a)
  1362. #define IDirect3DViewport3_DeleteLight(p,a) (p)->lpVtbl->DeleteLight(p,a)
  1363. #define IDirect3DViewport3_NextLight(p,a,b,c) (p)->lpVtbl->NextLight(p,a,b,c)
  1364. #define IDirect3DViewport3_GetViewport2(p,a) (p)->lpVtbl->GetViewport2(p,a)
  1365. #define IDirect3DViewport3_SetViewport2(p,a) (p)->lpVtbl->SetViewport2(p,a)
  1366. #define IDirect3DViewport3_SetBackgroundDepth2(p,a) (p)->lpVtbl->SetBackgroundDepth2(p,a)
  1367. #define IDirect3DViewport3_GetBackgroundDepth2(p,a,b) (p)->lpVtbl->GetBackgroundDepth2(p,a,b)
  1368. #define IDirect3DViewport3_Clear2(p,a,b,c,d,e,f) (p)->lpVtbl->Clear2(p,a,b,c,d,e,f)
  1369. #else
  1370. #define IDirect3DViewport3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1371. #define IDirect3DViewport3_AddRef(p) (p)->AddRef()
  1372. #define IDirect3DViewport3_Release(p) (p)->Release()
  1373. #define IDirect3DViewport3_Initialize(p,a) (p)->Initialize(a)
  1374. #define IDirect3DViewport3_GetViewport(p,a) (p)->GetViewport(a)
  1375. #define IDirect3DViewport3_SetViewport(p,a) (p)->SetViewport(a)
  1376. #define IDirect3DViewport3_TransformVertices(p,a,b,c,d) (p)->TransformVertices(a,b,c,d)
  1377. #define IDirect3DViewport3_LightElements(p,a,b) (p)->LightElements(a,b)
  1378. #define IDirect3DViewport3_SetBackground(p,a) (p)->SetBackground(a)
  1379. #define IDirect3DViewport3_GetBackground(p,a,b) (p)->GetBackground(a,b)
  1380. #define IDirect3DViewport3_SetBackgroundDepth(p,a) (p)->SetBackgroundDepth(a)
  1381. #define IDirect3DViewport3_GetBackgroundDepth(p,a,b) (p)->GetBackgroundDepth(a,b)
  1382. #define IDirect3DViewport3_Clear(p,a,b,c) (p)->Clear(a,b,c)
  1383. #define IDirect3DViewport3_AddLight(p,a) (p)->AddLight(a)
  1384. #define IDirect3DViewport3_DeleteLight(p,a) (p)->DeleteLight(a)
  1385. #define IDirect3DViewport3_NextLight(p,a,b,c) (p)->NextLight(a,b,c)
  1386. #define IDirect3DViewport3_GetViewport2(p,a) (p)->GetViewport2(a)
  1387. #define IDirect3DViewport3_SetViewport2(p,a) (p)->SetViewport2(a)
  1388. #define IDirect3DViewport3_SetBackgroundDepth2(p,a) (p)->SetBackgroundDepth2(a)
  1389. #define IDirect3DViewport3_GetBackgroundDepth2(p,a,b) (p)->GetBackgroundDepth2(a,b)
  1390. #define IDirect3DViewport3_Clear2(p,a,b,c,d,e,f) (p)->Clear2(a,b,c,d,e,f)
  1391. #endif
  1392. #endif /* DIRECT3D_VERSION >= 0x0600 */
  1393.  
  1394. #if(DIRECT3D_VERSION >= 0x0600)
  1395. #undef INTERFACE
  1396. #define INTERFACE IDirect3DVertexBuffer
  1397.  
  1398. DECLARE_INTERFACE_(IDirect3DVertexBuffer, IUnknown)
  1399. {
  1400.     /*** IUnknown methods ***/
  1401.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  1402.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1403.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1404.  
  1405.     /*** IDirect3DVertexBuffer methods ***/
  1406.     STDMETHOD(Lock)(THIS_ DWORD,LPVOID*,LPDWORD) PURE;
  1407.     STDMETHOD(Unlock)(THIS) PURE;
  1408.     STDMETHOD(ProcessVertices)(THIS_ DWORD,DWORD,DWORD,LPDIRECT3DVERTEXBUFFER,DWORD,LPDIRECT3DDEVICE3,DWORD) PURE;
  1409.     STDMETHOD(GetVertexBufferDesc)(THIS_ LPD3DVERTEXBUFFERDESC) PURE;
  1410.     STDMETHOD(Optimize)(THIS_ LPDIRECT3DDEVICE3,DWORD) PURE;
  1411. };
  1412.  
  1413. typedef struct IDirect3DVertexBuffer *LPDIRECT3DVERTEXBUFFER;
  1414.  
  1415. #if !defined(__cplusplus) || defined(CINTERFACE)
  1416. #define IDirect3DVertexBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1417. #define IDirect3DVertexBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
  1418. #define IDirect3DVertexBuffer_Release(p) (p)->lpVtbl->Release(p)
  1419. #define IDirect3DVertexBuffer_Lock(p,a,b,c) (p)->lpVtbl->Lock(p,a,b,c)
  1420. #define IDirect3DVertexBuffer_Unlock(p) (p)->lpVtbl->Unlock(p)
  1421. #define IDirect3DVertexBuffer_ProcessVertices(p,a,b,c,d,e,f,g) (p)->lpVtbl->ProcessVertices(p,a,b,c,d,e,f,g)
  1422. #define IDirect3DVertexBuffer_GetVertexBufferDesc(p,a) (p)->lpVtbl->GetVertexBufferDesc(p,a)
  1423. #define IDirect3DVertexBuffer_Optimize(p,a,b) (p)->lpVtbl->Optimize(p,a,b)
  1424. #else
  1425. #define IDirect3DVertexBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1426. #define IDirect3DVertexBuffer_AddRef(p) (p)->AddRef()
  1427. #define IDirect3DVertexBuffer_Release(p) (p)->Release()
  1428. #define IDirect3DVertexBuffer_Lock(p,a,b,c) (p)->Lock(a,b,c)
  1429. #define IDirect3DVertexBuffer_Unlock(p) (p)->Unlock()
  1430. #define IDirect3DVertexBuffer_ProcessVertices(p,a,b,c,d,e,f,g) (p)->ProcessVertices(a,b,c,d,e,f,g)
  1431. #define IDirect3DVertexBuffer_GetVertexBufferDesc(p,a) (p)->GetVertexBufferDesc(a)
  1432. #define IDirect3DVertexBuffer_Optimize(p,a,b) (p)->Optimize(a,b)
  1433. #endif
  1434. #endif /* DIRECT3D_VERSION >= 0x0600 */
  1435.  
  1436. #if(DIRECT3D_VERSION >= 0x0700)
  1437. #undef INTERFACE
  1438. #define INTERFACE IDirect3DVertexBuffer7
  1439.  
  1440. DECLARE_INTERFACE_(IDirect3DVertexBuffer7, IUnknown)
  1441. {
  1442.     /*** IUnknown methods ***/
  1443.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  1444.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1445.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1446.  
  1447.     /*** IDirect3DVertexBuffer7 methods ***/
  1448.     STDMETHOD(Lock)(THIS_ DWORD,LPVOID*,LPDWORD) PURE;
  1449.     STDMETHOD(Unlock)(THIS) PURE;
  1450.     STDMETHOD(ProcessVertices)(THIS_ DWORD,DWORD,DWORD,LPDIRECT3DVERTEXBUFFER7,DWORD,LPDIRECT3DDEVICE7,DWORD) PURE;
  1451.     STDMETHOD(GetVertexBufferDesc)(THIS_ LPD3DVERTEXBUFFERDESC) PURE;
  1452.     STDMETHOD(Optimize)(THIS_ LPDIRECT3DDEVICE7,DWORD) PURE;
  1453.     STDMETHOD(ProcessVerticesStrided)(THIS_ DWORD,DWORD,DWORD,LPD3DDRAWPRIMITIVESTRIDEDDATA,DWORD,LPDIRECT3DDEVICE7,DWORD) PURE;
  1454. };
  1455.  
  1456. typedef struct IDirect3DVertexBuffer7 *LPDIRECT3DVERTEXBUFFER7;
  1457.  
  1458. #if !defined(__cplusplus) || defined(CINTERFACE)
  1459. #define IDirect3DVertexBuffer7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  1460. #define IDirect3DVertexBuffer7_AddRef(p) (p)->lpVtbl->AddRef(p)
  1461. #define IDirect3DVertexBuffer7_Release(p) (p)->lpVtbl->Release(p)
  1462. #define IDirect3DVertexBuffer7_Lock(p,a,b,c) (p)->lpVtbl->Lock(p,a,b,c)
  1463. #define IDirect3DVertexBuffer7_Unlock(p) (p)->lpVtbl->Unlock(p)
  1464. #define IDirect3DVertexBuffer7_ProcessVertices(p,a,b,c,d,e,f,g) (p)->lpVtbl->ProcessVertices(p,a,b,c,d,e,f,g)
  1465. #define IDirect3DVertexBuffer7_GetVertexBufferDesc(p,a) (p)->lpVtbl->GetVertexBufferDesc(p,a)
  1466. #define IDirect3DVertexBuffer7_Optimize(p,a,b) (p)->lpVtbl->Optimize(p,a,b)
  1467. #define IDirect3DVertexBuffer7_ProcessVerticesStrided(p,a,b,c,d,e,f,g) (p)->lpVtbl->ProcessVerticesStrided(p,a,b,c,d,e,f,g)
  1468. #else
  1469. #define IDirect3DVertexBuffer7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  1470. #define IDirect3DVertexBuffer7_AddRef(p) (p)->AddRef()
  1471. #define IDirect3DVertexBuffer7_Release(p) (p)->Release()
  1472. #define IDirect3DVertexBuffer7_Lock(p,a,b,c) (p)->Lock(a,b,c)
  1473. #define IDirect3DVertexBuffer7_Unlock(p) (p)->Unlock()
  1474. #define IDirect3DVertexBuffer7_ProcessVertices(p,a,b,c,d,e,f,g) (p)->ProcessVertices(a,b,c,d,e,f,g)
  1475. #define IDirect3DVertexBuffer7_GetVertexBufferDesc(p,a) (p)->GetVertexBufferDesc(a)
  1476. #define IDirect3DVertexBuffer7_Optimize(p,a,b) (p)->Optimize(a,b)
  1477. #define IDirect3DVertexBuffer7_ProcessVerticesStrided(p,a,b,c,d,e,f,g) (p)->ProcessVerticesStrided(a,b,c,d,e,f,g)
  1478. #endif
  1479. #endif /* DIRECT3D_VERSION >= 0x0700 */
  1480.  
  1481. #if(DIRECT3D_VERSION >= 0x0500)
  1482. /****************************************************************************
  1483.  *
  1484.  * Flags for IDirect3DDevice::NextViewport
  1485.  *
  1486.  ****************************************************************************/
  1487.  
  1488. /*
  1489.  * Return the next viewport
  1490.  */
  1491. #define D3DNEXT_NEXT    0x00000001l
  1492.  
  1493. /*
  1494.  * Return the first viewport
  1495.  */
  1496. #define D3DNEXT_HEAD    0x00000002l
  1497.  
  1498. /*
  1499.  * Return the last viewport
  1500.  */
  1501. #define D3DNEXT_TAIL    0x00000004l
  1502.  
  1503.  
  1504. /****************************************************************************
  1505.  *
  1506.  * Flags for DrawPrimitive/DrawIndexedPrimitive
  1507.  *   Also valid for Begin/BeginIndexed
  1508.  *   Also valid for VertexBuffer::CreateVertexBuffer
  1509.  ****************************************************************************/
  1510.  
  1511. /*
  1512.  * Wait until the device is ready to draw the primitive
  1513.  * This will cause DP to not return DDERR_WASSTILLDRAWING
  1514.  */
  1515. #define D3DDP_WAIT                  0x00000001l
  1516. #endif /* DIRECT3D_VERSION >= 0x0500 */
  1517.  
  1518. #if (DIRECT3D_VERSION == 0x0500)
  1519. /*
  1520.  * Hint that it is acceptable to render the primitive out of order.
  1521.  */
  1522. #define D3DDP_OUTOFORDER            0x00000002l
  1523. #endif
  1524.  
  1525.  
  1526. #if(DIRECT3D_VERSION >= 0x0500)
  1527. /*
  1528.  * Hint that the primitives have been clipped by the application.
  1529.  */
  1530. #define D3DDP_DONOTCLIP             0x00000004l
  1531.  
  1532. /*
  1533.  * Hint that the extents need not be updated.
  1534.  */
  1535. #define D3DDP_DONOTUPDATEEXTENTS    0x00000008l
  1536. #endif /* DIRECT3D_VERSION >= 0x0500 */
  1537.  
  1538. #if(DIRECT3D_VERSION >= 0x0600)
  1539.  
  1540. /*
  1541.  * Hint that the lighting should not be applied on vertices.
  1542.  */
  1543.  
  1544. #define D3DDP_DONOTLIGHT            0x00000010l
  1545.  
  1546. #endif /* DIRECT3D_VERSION >= 0x0600 */
  1547.  
  1548. /*
  1549.  * Direct3D Errors
  1550.  * DirectDraw error codes are used when errors not specified here.
  1551.  */
  1552. #define D3D_OK              DD_OK
  1553. #define D3DERR_BADMAJORVERSION      MAKE_DDHRESULT(700)
  1554. #define D3DERR_BADMINORVERSION      MAKE_DDHRESULT(701)
  1555.  
  1556. #if(DIRECT3D_VERSION >= 0x0500)
  1557. /*
  1558.  * An invalid device was requested by the application.
  1559.  */
  1560. #define D3DERR_INVALID_DEVICE   MAKE_DDHRESULT(705)
  1561. #define D3DERR_INITFAILED       MAKE_DDHRESULT(706)
  1562.  
  1563. /*
  1564.  * SetRenderTarget attempted on a device that was
  1565.  * QI'd off the render target.
  1566.  */
  1567. #define D3DERR_DEVICEAGGREGATED MAKE_DDHRESULT(707)
  1568. #endif /* DIRECT3D_VERSION >= 0x0500 */
  1569.  
  1570. #define D3DERR_EXECUTE_CREATE_FAILED    MAKE_DDHRESULT(710)
  1571. #define D3DERR_EXECUTE_DESTROY_FAILED   MAKE_DDHRESULT(711)
  1572. #define D3DERR_EXECUTE_LOCK_FAILED  MAKE_DDHRESULT(712)
  1573. #define D3DERR_EXECUTE_UNLOCK_FAILED    MAKE_DDHRESULT(713)
  1574. #define D3DERR_EXECUTE_LOCKED       MAKE_DDHRESULT(714)
  1575. #define D3DERR_EXECUTE_NOT_LOCKED   MAKE_DDHRESULT(715)
  1576.  
  1577. #define D3DERR_EXECUTE_FAILED       MAKE_DDHRESULT(716)
  1578. #define D3DERR_EXECUTE_CLIPPED_FAILED   MAKE_DDHRESULT(717)
  1579.  
  1580. #define D3DERR_TEXTURE_NO_SUPPORT   MAKE_DDHRESULT(720)
  1581. #define D3DERR_TEXTURE_CREATE_FAILED    MAKE_DDHRESULT(721)
  1582. #define D3DERR_TEXTURE_DESTROY_FAILED   MAKE_DDHRESULT(722)
  1583. #define D3DERR_TEXTURE_LOCK_FAILED  MAKE_DDHRESULT(723)
  1584. #define D3DERR_TEXTURE_UNLOCK_FAILED    MAKE_DDHRESULT(724)
  1585. #define D3DERR_TEXTURE_LOAD_FAILED  MAKE_DDHRESULT(725)
  1586. #define D3DERR_TEXTURE_SWAP_FAILED  MAKE_DDHRESULT(726)
  1587. #define D3DERR_TEXTURE_LOCKED       MAKE_DDHRESULT(727)
  1588. #define D3DERR_TEXTURE_NOT_LOCKED   MAKE_DDHRESULT(728)
  1589. #define D3DERR_TEXTURE_GETSURF_FAILED   MAKE_DDHRESULT(729)
  1590.  
  1591. #define D3DERR_MATRIX_CREATE_FAILED MAKE_DDHRESULT(730)
  1592. #define D3DERR_MATRIX_DESTROY_FAILED    MAKE_DDHRESULT(731)
  1593. #define D3DERR_MATRIX_SETDATA_FAILED    MAKE_DDHRESULT(732)
  1594. #define D3DERR_MATRIX_GETDATA_FAILED    MAKE_DDHRESULT(733)
  1595. #define D3DERR_SETVIEWPORTDATA_FAILED   MAKE_DDHRESULT(734)
  1596.  
  1597. #if(DIRECT3D_VERSION >= 0x0500)
  1598. #define D3DERR_INVALIDCURRENTVIEWPORT   MAKE_DDHRESULT(735)
  1599. #define D3DERR_INVALIDPRIMITIVETYPE     MAKE_DDHRESULT(736)
  1600. #define D3DERR_INVALIDVERTEXTYPE        MAKE_DDHRESULT(737)
  1601. #define D3DERR_TEXTURE_BADSIZE          MAKE_DDHRESULT(738)
  1602. #define D3DERR_INVALIDRAMPTEXTURE       MAKE_DDHRESULT(739)
  1603. #endif /* DIRECT3D_VERSION >= 0x0500 */
  1604.  
  1605. #define D3DERR_MATERIAL_CREATE_FAILED   MAKE_DDHRESULT(740)
  1606. #define D3DERR_MATERIAL_DESTROY_FAILED  MAKE_DDHRESULT(741)
  1607. #define D3DERR_MATERIAL_SETDATA_FAILED  MAKE_DDHRESULT(742)
  1608. #define D3DERR_MATERIAL_GETDATA_FAILED  MAKE_DDHRESULT(743)
  1609.  
  1610. #if(DIRECT3D_VERSION >= 0x0500)
  1611. #define D3DERR_INVALIDPALETTE           MAKE_DDHRESULT(744)
  1612.  
  1613. #define D3DERR_ZBUFF_NEEDS_SYSTEMMEMORY MAKE_DDHRESULT(745)
  1614. #define D3DERR_ZBUFF_NEEDS_VIDEOMEMORY  MAKE_DDHRESULT(746)
  1615. #define D3DERR_SURFACENOTINVIDMEM       MAKE_DDHRESULT(747)
  1616. #endif /* DIRECT3D_VERSION >= 0x0500 */
  1617.  
  1618. #define D3DERR_LIGHT_SET_FAILED     MAKE_DDHRESULT(750)
  1619. #if(DIRECT3D_VERSION >= 0x0500)
  1620. #define D3DERR_LIGHTHASVIEWPORT     MAKE_DDHRESULT(751)
  1621. #define D3DERR_LIGHTNOTINTHISVIEWPORT           MAKE_DDHRESULT(752)
  1622. #endif /* DIRECT3D_VERSION >= 0x0500 */
  1623.  
  1624. #define D3DERR_SCENE_IN_SCENE       MAKE_DDHRESULT(760)
  1625. #define D3DERR_SCENE_NOT_IN_SCENE   MAKE_DDHRESULT(761)
  1626. #define D3DERR_SCENE_BEGIN_FAILED   MAKE_DDHRESULT(762)
  1627. #define D3DERR_SCENE_END_FAILED     MAKE_DDHRESULT(763)
  1628.  
  1629. #if(DIRECT3D_VERSION >= 0x0500)
  1630. #define D3DERR_INBEGIN                  MAKE_DDHRESULT(770)
  1631. #define D3DERR_NOTINBEGIN               MAKE_DDHRESULT(771)
  1632. #define D3DERR_NOVIEWPORTS              MAKE_DDHRESULT(772)
  1633. #define D3DERR_VIEWPORTDATANOTSET       MAKE_DDHRESULT(773)
  1634. #define D3DERR_VIEWPORTHASNODEVICE      MAKE_DDHRESULT(774)
  1635. #define D3DERR_NOCURRENTVIEWPORT        MAKE_DDHRESULT(775)
  1636. #endif /* DIRECT3D_VERSION >= 0x0500 */
  1637.  
  1638. #if(DIRECT3D_VERSION >= 0x0600)
  1639. #define D3DERR_INVALIDVERTEXFORMAT              MAKE_DDHRESULT(2048)
  1640.  
  1641. /*
  1642.  * Attempted to CreateTexture on a surface that had a color key
  1643.  */
  1644. #define D3DERR_COLORKEYATTACHED                 MAKE_DDHRESULT(2050)
  1645.  
  1646. #define D3DERR_VERTEXBUFFEROPTIMIZED            MAKE_DDHRESULT(2060)
  1647. #define D3DERR_VBUF_CREATE_FAILED               MAKE_DDHRESULT(2061)
  1648. #define D3DERR_VERTEXBUFFERLOCKED               MAKE_DDHRESULT(2062)
  1649. #define D3DERR_VERTEXBUFFERUNLOCKFAILED         MAKE_DDHRESULT(2063)
  1650.  
  1651. #define D3DERR_ZBUFFER_NOTPRESENT               MAKE_DDHRESULT(2070)
  1652. #define D3DERR_STENCILBUFFER_NOTPRESENT         MAKE_DDHRESULT(2071)
  1653.  
  1654. #define D3DERR_WRONGTEXTUREFORMAT               MAKE_DDHRESULT(2072)
  1655. #define D3DERR_UNSUPPORTEDCOLOROPERATION        MAKE_DDHRESULT(2073)
  1656. #define D3DERR_UNSUPPORTEDCOLORARG              MAKE_DDHRESULT(2074)
  1657. #define D3DERR_UNSUPPORTEDALPHAOPERATION        MAKE_DDHRESULT(2075)
  1658. #define D3DERR_UNSUPPORTEDALPHAARG              MAKE_DDHRESULT(2076)
  1659. #define D3DERR_TOOMANYOPERATIONS                MAKE_DDHRESULT(2077)
  1660. #define D3DERR_CONFLICTINGTEXTUREFILTER         MAKE_DDHRESULT(2078)
  1661. #define D3DERR_UNSUPPORTEDFACTORVALUE           MAKE_DDHRESULT(2079)
  1662. #define D3DERR_CONFLICTINGRENDERSTATE           MAKE_DDHRESULT(2081)
  1663. #define D3DERR_UNSUPPORTEDTEXTUREFILTER         MAKE_DDHRESULT(2082)
  1664. #define D3DERR_TOOMANYPRIMITIVES                MAKE_DDHRESULT(2083)
  1665. #define D3DERR_INVALIDMATRIX                    MAKE_DDHRESULT(2084)
  1666. #define D3DERR_TOOMANYVERTICES                  MAKE_DDHRESULT(2085)
  1667. #define D3DERR_CONFLICTINGTEXTUREPALETTE        MAKE_DDHRESULT(2086)
  1668.  
  1669. #endif /* DIRECT3D_VERSION >= 0x0600 */
  1670.  
  1671. #if(DIRECT3D_VERSION >= 0x0700)
  1672. #define D3DERR_INVALIDSTATEBLOCK        MAKE_DDHRESULT(2100)
  1673. #define D3DERR_INBEGINSTATEBLOCK        MAKE_DDHRESULT(2101)
  1674. #define D3DERR_NOTINBEGINSTATEBLOCK     MAKE_DDHRESULT(2102)
  1675. #endif /* DIRECT3D_VERSION >= 0x0700 */
  1676.  
  1677.  
  1678. #ifdef __cplusplus
  1679. };
  1680. #endif
  1681.  
  1682. #endif /* _D3D_H_ */
  1683.  
  1684.